java.lang.IllegalArgumentException: id to load is required for loading
2012-11-12 14:48
465 查看
2009-10-24 10:58:57 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1108
严重: >>java.lang.IllegalArgumentException: id to load is required for loading
>> at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:51)
>> at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:33)
>> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:812)
>> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
>> at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:182)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:357)
>>...
原因:使用JPA时,当使用find(Class<T> clazz, Serializable id);此方法時,若id為空,則會出現以上錯誤。
严重: >>java.lang.IllegalArgumentException: id to load is required for loading
>> at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:51)
>> at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:33)
>> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:812)
>> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
>> at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:182)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:357)
>>...
原因:使用JPA时,当使用find(Class<T> clazz, Serializable id);此方法時,若id為空,則會出現以上錯誤。
相关文章推荐
- java.lang.IllegalArgumentException: id to load is required for loading解决方法
- 出现java.lang.IllegalArgumentException: id to load is required for loading的解决方法
- java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading 解决方法
- java.lang.IllegalArgumentException: id to load is required for loading
- 出现java.lang.IllegalArgumentException: id to load is required for loading的解决方法
- java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading
- Validate不验证之java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading
- 【SSH进阶】java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException: id to load is required for loading
- java.lang.IllegalArgumentException:A ServletContext is required to configure default servlet handlin
- id to load is required for loading----id被要求加载exception
- 解决kylin报错:Failed to create dictionary on <db>.<table>, Caused by: java.lang.IllegalArgumentException: Too high cardinality is not suitable for dictionary
- Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class cn.e3mall.pojo.TbItem
- Caused by: java.lang.IllegalArgumentException: The handle attribute is must refer to an existing chi
- spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException