I am running tomcat7 on ubuntu and have written a servlet program, that 
executes a simple create nodes function using java embedded APIs, when I 
call a specific url.

The problem that I face is that often when I call the url, I get a lucene 
write lock error, check the stack trace 
here: https://gist.github.com/niranjan-uma-shankar/20e26edaf205c4f97b04

messages.log has this to say:

Startup failed: Component 
'org.neo4j.kernel.impl.transaction.XaDataSourceManager@71a60d09' was 
successfully initialized, but failed to start. Please see attached cause 
exception.: Component 
'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource@611fd81f' was 
successfully initialized, but failed to start. Please see attached cause 
exception.: Component 
'org.neo4j.kernel.api.impl.index.LuceneLabelScanStore@4fd5db0b' failed to 
initialize. Please see attached cause exception.: Lock obtain timed out: 
NativeFSLock@/var/lib/neo4j-community-2.1.7/data/graph.db/schema/label/lucene/write.lock

My guess is that the following line in my code is the root cause of the 
error:

graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );

Maybe Tomcat doesn't have the appropriate permissions to write to neo4j db 
path? I noticed that the graph.db directory was getting created with user 
and group permissions as tomcat7. So, I changed /etc/default/tomcat7 to 
have the following properties (the default values where tomcat7 for user 
and group) and restarted tomcat7 process:


# Run Tomcat as this user ID. Not setting this or leaving it blank will use 
the

# default of tomcat7.

TOMCAT7_USER=ubuntu

# Run Tomcat as this group ID. Not setting this or leaving it blank will use

# the default of tomcat7.

TOMCAT7_GROUP=ubuntu


I still don't have luck. Any clues on why the write lock errors are showing 
up?

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to