Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding lucene-facet dependency stops database from starting up #7159

Closed
CheriePun opened this issue May 18, 2016 · 2 comments
Closed

Adding lucene-facet dependency stops database from starting up #7159

CheriePun opened this issue May 18, 2016 · 2 comments

Comments

@CheriePun
Copy link

I was trying to add a dependency " compile group: 'org.apache.lucene', name: 'lucene-facet', version: '6.0.0' " to use the LRUHashMap, but it seems that by adding this dependency, neo4j fails to create a test database or an embedded database.

Neo4j Version: 2.3.3
Operating System: Windows 8
API: Java API

Steps to reproduce

  1. Added "compile group: 'org.apache.lucene', name: 'lucene-facet', version: '6.0.0'" to gradle file
@Before
    public void prepareTestDatabase(){
        graphDb = new TestGraphDatabaseFactory()
                .newImpermanentDatabaseBuilder()
                .setConfig( GraphDatabaseSettings.pagecache_memory, "512M" )
                .setConfig( GraphDatabaseSettings.string_block_size, "60" )
                .setConfig( GraphDatabaseSettings.array_block_size, "300" )
                .newGraphDatabase();
    }

3 Run the test

Stack trace:

java.lang.RuntimeException: Error starting org.neo4j.test.TestGraphDatabaseFactory$1$1, 

    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)
    at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
    at org.neo4j.test.TestGraphDatabaseFactory$1.newDatabase(TestGraphDatabaseFactory.java:171)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:185)
    at Neo4j.JSONInserterTest.prepareTestDatabase(JSONInserterTest.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@2559c968' failed to initialize. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434)
    at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
    ... 32 more
Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/document/Fieldable
    at org.neo4j.kernel.api.impl.index.NodeRangeDocumentLabelScanStorageStrategy.<init>(NodeRangeDocumentLabelScanStorageStrategy.java:71)
    at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newInstance(LuceneLabelScanStoreExtension.java:72)
    at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newInstance(LuceneLabelScanStoreExtension.java:39)
    at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:69)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424)
    ... 35 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.document.Fieldable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 40 more
@MishaDemianenko
Copy link
Contributor

Well your stack trace makes it clear that there are problems with lucene dependencies.
But if you even make sure they are there - Neo4j 2.3.3 use lucene 3.6.2 and will not work with lucene 6 family.

@CheriePun
Copy link
Author

Thanks for your quick reply. I realised that it might be easier for me to implement it on my own rather than depending on another library for just one class. Thanks for pointing out the differences in versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants