Hello,
I am new to neo4j and I want to embedd neo4j in an OSGI server.
I have created a neo4j-api bundle which embedd all neo4j related libraries and have created a neo4j-store which use the neo4j-api bundle and create an embedded graph database.
I have this exception at start-up :
java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /storage/cydu/SSIM/Biotech/dev/rdf-server/rdf-server-distribution/target/rdf-server-distribution-1.0.0-bin/rdf-server-distribution-1.0.0/db/data
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:232)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:148)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:133)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:122)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$EmbeddedDatabaseCreator.newDatabase(GraphDatabaseFactory.java:178)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:210)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:79)
at org.hug.simed.rdf.store.neo4j.MyStore.start(MyStore.java:61)
at org.hug.simed.rdf.store.neo4j.impl.Activator.try_register(Activator.java:47)
at org.hug.simed.rdf.store.neo4j.impl.Activator.start(Activator.java:71)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@7a8d46db' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown setting: dbms.tx_log.rotation.size".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:116)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:227)
... 15 more
Caused by: java.lang.IllegalArgumentException: Unknown setting: dbms.tx_log.rotation.size
at org.neo4j.kernel.configuration.Config.verifyValidDynamicSetting(Config.java:668)
at org.neo4j.kernel.configuration.Config.registerDynamicUpdateListener(Config.java:711)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.getRotationThresholdAndRegisterForUpdates(LogFilesBuilder.java:260)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.buildContext(LogFilesBuilder.java:239)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.build(LogFilesBuilder.java:182)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:331)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 20 more
My suspicion is that repackaging for OSGI does not aggreate the service loader file. Double check your META-INF/services/org.neo4j.configuration.LoadableConfig file.`
System.out.println("starting neo4j bundle..");
ServiceLoader<LoadableConfig> serviceLoader = ServiceLoader.load(LoadableConfig.class);
Iterator<LoadableConfig> it = serviceLoader.iterator();
while( it.hasNext() ) {
final LoadableConfig config = it.next();
System.out.println("-> "+config);
}
final File databaseDirectory = new File("./db/data/neo-db");
db = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( databaseDirectory )
.newGraphDatabase();
And the output :
starting neo4j bundle..
-> org.neo4j.graphdb.factory.GraphDatabaseSettings@24b173a5
-> org.neo4j.kernel.configuration.ssl.LegacySslPolicyConfig@40023c2f
-> org.neo4j.kernel.configuration.ssl.SslPolicyConfig@5aa16064
-> org.neo4j.kernel.impl.index.schema.config.SpatialIndexSettings@32604d
-> org.neo4j.kernel.configuration.ssl.SslSystemSettings@34d38e70
ERROR: Bundle test.neo4j [26] Error starting file:/storage/cydu/SSIM/Biotech/dev/rdf-server/rdf-server-distribution/target/rdf-server-distribution-1.0.0-bin/rdf-server-distribution-1.0.0/bundle/test-neo4j.jar (org.osgi.framework.BundleException: Activator start error in bundle test.neo4j [26].)
java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /storage/cydu/SSIM/Biotech/dev/rdf-server/rdf-server-distribution/target/rdf-server-distribution-1.0.0-bin/rdf-server-distribution-1.0.0/db/data
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:232)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:148)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:133)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:122)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$EmbeddedDatabaseCreator.newDatabase(GraphDatabaseFactory.java:178)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:210)
at org.hug.simed.rdf.test.impl.Activator.start(Activator.java:67)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@678fef7e' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown setting: dbms.tx_log.rotation.size".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:116)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:227)
... 12 more
Caused by: java.lang.IllegalArgumentException: Unknown setting: dbms.tx_log.rotation.size
at org.neo4j.kernel.configuration.Config.verifyValidDynamicSetting(Config.java:668)
at org.neo4j.kernel.configuration.Config.registerDynamicUpdateListener(Config.java:711)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.getRotationThresholdAndRegisterForUpdates(LogFilesBuilder.java:260)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.buildContext(LogFilesBuilder.java:239)
at org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder.build(LogFilesBuilder.java:182)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:331)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 17 more