gpt4 book ai didi

java - 调试 JDO 错误

转载 作者:行者123 更新时间:2023-11-30 11:43:50 25 4
gpt4 key购买 nike

我的应用程序抛出此错误:

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

如果没有遗漏 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.

最佳答案

使用最新版本。包括所有依赖项(jdo-api、datanucleus-api-jdo)。阅读文档了解 CLASSPATH 中需要包含的内容(例如,类的增强版本)。

关于java - 调试 JDO 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11076051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com