1

有一个这样的 NamedQuery:

@NamedQuery(name = "getOpakOdeslaniForPartner", query = "select 

新的= :typPrijemce"

值对象有一个带有三个参数的构造函数。

有这样一个日志(WebLogic 11g,HP-UX):

Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:1172209 nonfatal user error> org.apache.openjpa.util.UserException: There was an error packing the projection and/or aggregate results of the query into result type "class com..vo.OpakOdeslaniVO".  See the nested Throwable exception for details.
    at org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:262)
    at org.apache.openjpa.kernel.ResultPacker.pack(ResultPacker.java:225)
    at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(QueryImpl.java:1960)
    at com..service.OpakOdeslani.getOpakOdeslaniForPartner(.java:52)
    at sun.reflect.GeneratedMethodAccessor1516.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

Caused by: java.lang.IllegalArgumentException
    at sun.reflect.GeneratedConstructorAccessor747.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:235) ... 114 more

实际上我觉得卡住了,因为没有 IllegalArgumentException 的解释消息,而且我找不到 GeneratedConstructorAccessor747 类的源代码。任何想法,发生了什么以及如何解决这个问题?我想值对象构造函数或类肯定有问题。

谢谢

4

1 回答 1

0

确保其类型opak.pocetPokusu, opak.idSekvenceOpakovani.idOpakSekvence, opak.idSekvenceOpakovani.sekvence与 com.vo.OpakOdeslaniVO 的构造函数提供的类型相同。

作为调试点,您可以只选择这些字段以确保返回数据?

于 2013-04-30T21:14:14.443 回答