2016-11-29 45 views
0

我有下一個問題,仍然無法解決它。請任何人都可以幫助我? java.lang.NoClassDefFoundError:COM/orientechnologies /東方/核心/存儲/ IMPL /本地/ OStorageRecoverListener無法連接到與Java API的orientdb數據庫

完全錯誤:

java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/storage/impl/local/OStorageRecoverListener 
at java.lang.ClassLoader.defineClass1(Native Method) 
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) 
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2251) 
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:810) 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1253) 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1118) 
at edu.ucla.sspace.doc.reader.SearchInterface.init(SearchInterface.java:50) 
at com.vaadin.ui.UI.doInit(UI.java:698) 
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:214) 
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) 
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) 
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422) 
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:379) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) 
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) 
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) 
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) 
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) 
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) 
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.ClassNotFoundException: com.orientechnologies.orient.core.storage.impl.local.OStorageRecoverListener 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1284) 
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1118) 
... 37 more 

現在我有一個代碼,用於連接到DATABSE:

OrientGraphFactory factory = new OrientGraphFactory("plocal:/opt/orientdb/databases/fulltext","root","root").setupPool(1,10); 

我的pom.xml扶養:

<dependency> 
    <groupId>com.googlecode.concurrentlinkedhashmap</groupId> 
    <artifactId>concurrentlinkedhashmap-lru</artifactId> 
    <version>1.4.2</version> 
</dependency> 
<dependency> 
    <groupId>com.orientechnologies</groupId> 
    <artifactId>orientdb-client</artifactId> 
    <version>2.0.8</version> 
</dependency> 
<dependency> 
    <groupId>com.orientechnologies</groupId> 
    <artifactId>orientdb-core</artifactId> 
    <version>2.0.8</version> 
</dependency> 
<!-- https://mvnrepository.com/artifact/com.orientechnologies/orientdb-enterprise --> 
<dependency> 
    <groupId>com.orientechnologies</groupId> 
    <artifactId>orientdb-enterprise</artifactId> 
    <version>2.2.0-beta</version> 
</dependency> 
<dependency> 
    <groupId>com.tinkerpop.blueprints</groupId> 
    <artifactId>blueprints-core</artifactId> 
    <version>2.5.0</version> 
</dependency> 
<dependency> 
    <groupId>com.orientechnologies</groupId> 
    <artifactId>orientdb-graphdb</artifactId> 
    <version>2.1.12</version> 
</dependency> 
+0

爲什麼你在core,client和graphdb中使用不同的版本。你能用最新的2.2.13試試嗎? –

+1

你應該需要only' com.orientechnologies orientdb-graphdb 2.2.13 ' –

回答

1

確定,問題在於我以根作用連接。通過antering root而不是根目錄解決,但是以admin角色解決。它不依賴於依賴)

+0

你的依賴是一個爛攤子。請清除它們。 –

+0

好吧,我嘗試刪除其中的一個(exept東方圖),我的項目被粉碎。我有另一個代碼和庫,每個依賴使用:)我需要所有這些。但是,一個問題是,東方客戶和東方核心。對於寫入和關閉數據庫我需要另一個版本。爲了從我的界面的數據庫中讀取,我需要另一個。但它沒有這麼大的問題,因爲我建立和創建數據庫只有一次),但謝謝你)@RobertoFranchini –

+0

我真的不明白它如何能處理如此混亂的版本。所有的OrientDB版本必須相同,如果你運行的是獨立服務器,你的應用程序應該使用相同的api版本的服務器。如果更改依賴項版本,您的項目不會生效,請修復complitation。但是肯定的是,你不能用這種方式進行生產,並希望所有的方法都能正常工作。這就是說,做你想做的。我2歐分。 –