Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

java - org.apache.openjpa.persistence.PersistenceException: null

The second line is causing the exception listed below. This code actually works on the test server, but is blowing up on my box. Can anyone offer a clue what I need to look at to solve this?

   TypedQuery<ed> _TypedQuery = _EntityManager.createQuery(_CriteriaQuery);
   List<ed>       _edList     = _TypedQuery.getResultList();

Exception

org.apache.openjpa.persistence.PersistenceException: null
   at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1017) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:916) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1012) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2381) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:274) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:60) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(QueryImpl.java:2075) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:286) ~[openjpa-2.2.0.jar:2.2.0]
   at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302) ~[openjpa-2.2.0.jar:2.2.0]
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I'll document all my solutions to this problem.

  • This is the 1st resolution. The clue was here. I upgraded Open JPA from 2.2.0 to 2.2.2 & the exception went away, so it appears that it was a bug.

  • This happened again. I was missing cglib.2.2.3.zip and/or cglib-nodep-2.2.3.jar.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...