0

I am facing this weird error while creating GraphDB object in java. My neo4j Version : 2.2.5

My code:

public static void main(String[] args) throws FileNotFoundException,
        IOException, ParseException {
    GraphDatabaseService graphdb = new GraphDatabaseFactory()
            .newEmbeddedDatabase(dbLocation);
    System.out.println("GraphDb started");

But, it is throwing the following error:

Exception in thread "main" java.lang.NoSuchMethodError: org.neo4j.io.pagecache.impl.SingleFilePageSwapperFactory.<init>(Lorg/neo4j/io/fs/FileSystemAbstraction;)V
at org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory.<init>(ConfiguringPageCacheFactory.java:47)
at org.neo4j.kernel.InternalAbstractGraphDatabase.createPageCache(InternalAbstractGraphDatabase.java:715)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:486)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:324)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:67)
at com.spnotes.kafka.Readlog.main(Readlog.java:26)

Earlier my code worked fine. Unable to figure the reason. Thankyou

Jack Daniel
  • 2,527
  • 3
  • 31
  • 52

1 Answers1

0

Simply looks like a packaging issue, in that you have jars for different versions/builds on the classpath

Mattias Finné
  • 3,034
  • 1
  • 15
  • 7