2
votes

I am trying to use 2.0.0-M1 version of grails plugin for neo4j but when i try to save any entity,it is giving me error :

The instance was updated by another user while you were editing. Stacktrace follows: org.grails.datastore.mapping.core.OptimisticLockingException: The instance was updated by another user while you were editing at org.grails.datastore.gorm.neo4j.NodePendingUpdate.run(NodePendingUpdate.java:83)

and if i try to use 2.0.0-M2 version,i got error :

groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.startsWith() is applicable for argument types: (java.lang.String) values: [jdbc:neo4j:instance:]

Also tell me if 2.0.0-M2 is supporting rest or not.

Please reply fast.

1

1 Answers

2
votes

Configuration has changed significantly from M1 to M2. Internally the plugin now uses the Neo4j JDBC driver. I didn't yet found enough time to update the docs, in the meantime refer to https://github.com/sarmbruster/neo4jsample/blob/neo4j_2.0/grails-app/conf/DataSource.groovy for a valid sample config.

The error you're mentioning seems to be caused by a incorrect configuration.

M2 is capable of working with remote database, just set datasource.url="jdbc:neo4j://localhost:7474/", see https://github.com/sarmbruster/neo4jsample/blob/neo4j_2.0/grails-app/conf/DataSource.groovy#L13