NutzCN Logo
问答 请教一下大神,我在执行dao().delete(pojo);操作时,报了下面的错误,请问一下这是什么错误,怎么解决啊?
发布于 2545天前 作者 qq_b9f971d9 1697 次浏览 复制 上一个帖子 下一个帖子
标签:

java.lang.RuntimeException: Don't know how to make fetch key com.sys.activiti.actIdMembership.bean.ActIdMembershipPojo:'ActIdMembershipPojo [userId_=201801031534000366, groupId_=1344]'
at org.nutz.lang.Lang.makeThrow(Lang.java:133)
at org.nutz.dao.util.Pojos$Items.cndAuto(Pojos.java:155)
at org.nutz.dao.impl.EntityOperator.addDeleteSelfOnly(EntityOperator.java:185)
at org.nutz.dao.impl.NutDao.delete(NutDao.java:428)
at com.sys.activiti.actIdMembership.service.ActIdMembershipService.deleteActMembership(ActIdMembershipService.java:36)
at com.sys.framework.role.service.RoleService$8.run(RoleService.java:581)
at org.nutz.trans.Trans.exec(Trans.java:174)
at org.nutz.trans.Trans.exec(Trans.java:132)
at com.sys.framework.role.service.RoleService.editUserRole(RoleService.java:573)
at com.sys.framework.role.controller.RoleAction.editUserRole(RoleAction.java:124)
at com.sys.framework.role.controller.RoleAction$FM$editUserRole$8ca68ff379736e775d8f0116d4dbb445.invoke(RoleAction.java)
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1368)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

2 回复

ActIdMembershipPojo缺@Id/@Name/@Pk, 必须有其中一种才能调用dao.delete(obj)的

@wendal 谢谢我兽叔,一语点醒梦中人啊,之前看文档的时候,看到过这个,但是没注意,刚刚看到兽叔提醒,才突然想起的

添加回复
请先登陆
回到顶部