错误调试—— id to load is required for loading

来源:互联网 发布:unity3d赛车 编辑:程序博客网 时间:2024/06/04 01:32

今天碰到这个错误。错误信息如下:

java.lang.IllegalArgumentException: id to load is required for loading
at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:92) ~[hibernate-core-5.0.1.Final.jar:5.0.1.Final]
at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:62) ~[hibernate-core-5.0.1.Final.jar:5.0.1.Final]
at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2624) ~[hibernate-core-5.0.1.Final.jar:5.0.1.Final]
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:955) ~[hibernate-core-5.0.1.Final.jar:5.0.1.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1075) ~[hibernate-entitymanager-5.0.1.Final.jar:5.0.1.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1033) ~[hibernate-entitymanager-5.0.1.Final.jar:5.0.1.Final]

网上搜了下,基本都是说参数有为null,后来断点调试,发现参数没有接收到。

在api方法中,数据为空。但是页面in打印是有数据的。


我使用的delete方法是他人封装的,

httpRequest($http, "api/bill-pattern2/remove",    successCallback, null, hrDialog, HrUtils.httpMethod.DELETE,    $scope.patternListData[$scope.currentSelectedBillPatternIndex].patternCode);

页面打印出的值


就查询了下别人如何使用这个封装的函数的。

发现他们传值是在URL路径上。


然后就 成功了。

所以如果出现这个错误,那么应该是传送数据有问题了。


0 0
原创粉丝点击