2012-06-18 59 views
2

我的應用程序拋出這個錯誤:調試JDO錯誤

Error : An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jdo.JDOAdapter" 
(perhaps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH?) : 
{1} 
org.datanucleus.exceptions.NucleusUserException: Error : 
An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jdo.JDOAdapter" (perhaps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH?) : 
{1} 
... 
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) 

雖然我的應用程序確實有datanucleus-api-jdo-3.0.0-release.jar

可能是什麼原因,如果不缺罐?

編輯:

這是已經提出來解決這個問題:

This is a sporadic error that happens from time to time on any persistable class, but moreso on ones that are used a lot in parallel. It happens in JDO and JPA, and it seems as though the local datastore locks a particular table/entity group and forgets to release it; thus causing all subsequent calls to ds operations to fail. I generally don't have to restart eclipse; just stopping then starting the server tends to fix the problem, if not, a full refresh/clean build will do the trick.

不過,我已經重新啓動我的GAE服務器並重新運行我的應用程序仍然得到同樣的錯誤。

下面是完整的POM.xml

下面是完整的stack trace.

+1

正如已經說過的,看看日誌,堆棧跟蹤等等。 – DataNucleus

+0

是的,看着堆棧跟蹤,我可以看到從QueuedThreadPool.java生成的錯誤,並且搜索互聯網這是人們所暗示的:「這是一個零星的錯誤,不時發生在任何persistable類「 – xybrek

+0

@DataNucleus我已編輯的問題,以顯示建議的解決方案 – xybrek

回答

1

使用最新版本。包含所有依賴關係(jdo-api,datanucleus-api-jdo)。閱讀CLASSPATH中需要的文檔(例如,類的增強版本)。