cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4J Starting Failed

Trying to connect Neo4j graph 3.5.3 using

import org.apache.commons.configuration2.BaseConfiguration;
import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;


Configuration configuration = new BaseConfiguration();
			configuration.addProperty("gremlin.graph", "org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph");
			configuration.addProperty("gremlin.neo4j.directory","D:\\neo4j\\neo4j-community-3.5.30-windows\\neo4j-community-3.5.30\\data\\databases\\graph.db");
			configuration.addProperty("gremlin.neo4j.conf.dbms.connector.0.type", "BOLT");
			configuration.addProperty("gremlin.neo4j.conf.dbms.connector.0.enabled", "true");
			configuration.addProperty("gremlin.neo4j.conf.dbms.connector.0.address", "localhost:7687");
			configuration.addProperty("gremlin.neo4j.conf.dbms.security.auth_enabled","true");
//			configuration.addProperty("gremlin.neo4j.conf.dbms.connector.0.username", "neo4j");
//			configuration.addProperty("gremlin.neo4j.conf.dbms.connector.0.password", "disha@1997");

			return Neo4jGraph.open(configuration);

but getting this error

java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, D:\neo4j\neo4j-community-3.5.30-windows\neo4j-community-3.5.30\data\databases\graph.db
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:212)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:125)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:137)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:130)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:107)
	at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:199)
	at org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl.newGraphDatabase(Neo4jFactoryImpl.java:46)
	at org.neo4j.tinkerpop.api.Neo4jFactory$Builder.open(Neo4jFactory.java:32)
	at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.<init>(Neo4jGraph.java:95)
	at org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph.open(Neo4jGraph.java:109)
	at com.neo4j.plugin.Neo4jMavenGraph.Neo4jGremlin.getGremlinGraph(Neo4jGremlin.java:95)
	at com.neo4j.plugin.Neo4jMavenGraph.Neo4jGremlin.main(Neo4jGremlin.java:31)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@72e295cc' was successfully initialized, but failed to start. Please see the attached cause exception "Tried to get index provider with name {key=native-btree, version=1.0} whereas available providers in this session being [lucene-1.0, lucene+native-1.0, lucene+native-2.0], and default being lucene+native-2.0".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:100)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:208)
	... 11 more
Caused by: java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine@4af45442' failed to initialize. Please see the attached cause exception "Tried to get index provider with name {key=native-btree, version=1.0} whereas available providers in this session being [lucene-1.0, lucene+native-1.0, lucene+native-2.0], and default being lucene+native-2.0".
	at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:531)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
	... 16 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine@4af45442' failed to initialize. Please see the attached cause exception "Tried to get index provider with name {key=native-btree, version=1.0} whereas available providers in this session being [lucene-1.0, lucene+native-1.0, lucene+native-2.0], and default being lucene+native-2.0".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:427)
	at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:98)
	at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:515)
	... 17 more
Caused by: java.lang.IllegalArgumentException: Tried to get index provider with name {key=native-btree, version=1.0} whereas available providers in this session being [lucene-1.0, lucene+native-1.0, lucene+native-2.0], and default being lucene+native-2.0
	at org.neo4j.kernel.impl.transaction.state.DefaultIndexProviderMap.notFound(DefaultIndexProviderMap.java:105)
	at org.neo4j.kernel.impl.transaction.state.DefaultIndexProviderMap.lookup(DefaultIndexProviderMap.java:86)
	at org.neo4j.kernel.impl.api.index.IndexingService.lambda$init$1(IndexingService.java:206)
	at org.neo4j.kernel.impl.api.index.IndexMapReference.modify(IndexMapReference.java:52)
	at org.neo4j.kernel.impl.api.index.IndexingService.init(IndexingService.java:196)
	at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.init(RecordStorageEngine.java:407)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)
	... 20 more

what will be the solution for this

1 REPLY 1

Root cause here:

Caused by: java.lang.IllegalArgumentException: Tried to get index provider with name {key=native-btree, version=1.0} whereas available providers in this session being [lucene-1.0, lucene+native-1.0, lucene+native-2.0], and default being lucene+native-2.0

Looks like there are issues with the underlying database store.

This is just a guess but it looks like you are running a newer Neo4j version (e.g. 4.3) on top of a set of database files from an older version of Neo4j. The database is saying it only supports v2 of the lucene native index store, and what it's actually finding is 1.0. So that suggests an old database.

The solution would be that you need to follow the migration path for the older database files so that you can use it with the latest software.