我在jsf应用程序中导入neo4j时遇到问题。我正在使用jsf 2.2 + tomcat 7.4。我还使用neo4j jdbc 2.0.0-M6驱动程序连接到2.0.0社区版服务器。这是异常的堆栈。我写了数据源和DAO方法来插入节点..但有一些错误..依赖?我复制了web-inf / lib neo4j 2.0.0内核jars lucene-index和lucene 3.6 core。我是Web应用程序的新手,我不懂Spring Framework。
java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@ad20477' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:281)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81)
at org.neo4j.test.ImpermanentGraphDatabase.<init>(ImpermanentGraphDatabase.java:92)
at org.neo4j.test.ImpermanentGraphDatabase.<init>(ImpermanentGraphDatabase.java:69)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.defaultImpermanentDb(EmbeddedDatabases.java:73)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.createDatabase(EmbeddedDatabases.java:68)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.createExecutor(EmbeddedDatabases.java:77)
at org.neo4j.jdbc.Driver.createExecutor(Driver.java:131)
at org.neo4j.jdbc.Neo4jConnection.createExecutor(Neo4jConnection.java:75)
at org.neo4j.jdbc.Neo4jConnection.<init>(Neo4jConnection.java:61)
at org.neo4j.jdbc.Connections$4.doCreate(Connections.java:51)
at org.neo4j.jdbc.Connections.create(Connections.java:63)
at org.neo4j.jdbc.Driver.connect(Driver.java:64)
at org.neo4j.jdbc.Driver.connect(Driver.java:36)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at org.pipe.java.web.netnografica.persistenza.graphdb.DataSourceSemplice.getConnection(DataSourceSemplice.java:46)
at org.pipe.java.web.netnografica.persistenza.graphdb.DAONodo.doInsertNodo(DAONodo.java:41)
at org.pipe.java.web.netnografica.controllo.ControlloAscoltaTwitter$1.setParametriNodo(ControlloAscoltaTwitter.java:212)
at org.pipe.java.web.netnografica.controllo.ControlloAscoltaTwitter$1.onStatus(ControlloAscoltaTwitter.java:104)
at twitter4j.StatusStreamImpl.onStatus(StatusStreamImpl.java:75)
at twitter4j.StatusStreamBase$1.run(StatusStreamBase.java:114)
at twitter4j.internal.async.ExecuteThread.run(DispatcherImpl.java:116)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@ad20477' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:473)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:61)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:95)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:259)
... 23 more
Caused by: java.lang.NoSuchMethodError: org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction.getOrCreateThirdPartyFileSystem(Ljava/lang/Class;Lorg/neo4j/helpers/Function;)Lorg/neo4j/kernel/impl/nioneo/store/FileSystemAbstraction$ThirdPartyFileSystem;
at org.neo4j.kernel.api.impl.index.LuceneKernelExtensions.directoryFactory(LuceneKernelExtensions.java:34)
at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:71)
at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:39)
at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:102)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:467)
... 26 more
谢谢!再见!
编辑:我正在使用自定义netbeans项目和自定义ant构建文件,而不是mavenEDIT2:我将项目迁移到maven新项目中......似乎是正确但是:
java.lang.NoSuchFieldError: use_memory_mapped_buffers
at org.neo4j.test.ImpermanentGraphDatabase.withForcedInMemoryConfiguration(ImpermanentGraphDatabase.java:162)
at org.neo4j.test.ImpermanentGraphDatabase.<init>(ImpermanentGraphDatabase.java:88)
at org.neo4j.test.ImpermanentGraphDatabase.<init>(ImpermanentGraphDatabase.java:65)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.defaultImpermanentDb(EmbeddedDatabases.java:73)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.createDatabase(EmbeddedDatabases.java:68)
at org.neo4j.jdbc.embedded.EmbeddedDatabases.createExecutor(EmbeddedDatabases.java:77)
at org.neo4j.jdbc.Driver.createExecutor(Driver.java:131)
at org.neo4j.jdbc.Neo4jConnection.createExecutor(Neo4jConnection.java:75)
at org.neo4j.jdbc.Neo4jConnection.<init>(Neo4jConnection.java:61)
at org.neo4j.jdbc.Connections$4.doCreate(Connections.java:51)
at org.neo4j.jdbc.Connections.create(Connections.java:63)
at org.neo4j.jdbc.Driver.connect(Driver.java:64)
at org.neo4j.jdbc.Driver.connect(Driver.java:36)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at org.pipe.java.web.netnografica.persistenza.graphdb.DataSourceSemplice.getConnection(DataSourceSemplice.java:46)
at org.pipe.java.web.netnografica.persistenza.graphdb.DAONodo.doInsertNodo(DAONodo.java:41)
at org.pipe.java.web.netnografica.controllo.ControlloAscoltaTwitter$1.setParametriNodo(ControlloAscoltaTwitter.java:212)
at org.pipe.java.web.netnografica.controllo.ControlloAscoltaTwitter$1.onStatus(ControlloAscoltaTwitter.java:104)
at twitter4j.StatusStreamImpl.onStatus(StatusStreamImpl.java:75)
at twitter4j.StatusStreamBase$1.run(StatusStreamBase.java:114)
at twitter4j.internal.async.ExecuteThread.run(DispatcherImpl.java:116)
可能缺少配置文件.. -.-'