Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes [EJB:010142] error for cascade-delete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "[EJB:010142] error for cascade-delete" Watch "[EJB:010142] error for cascade-delete" New topic
Author

[EJB:010142] error for cascade-delete

vinod sipivishta
Greenhorn

Joined: Nov 23, 2011
Posts: 2
Hi,

I'm getting [EJB:010142] error (Instance of EJB <relatedEJB> with primary key <pk> does not exist) while trying to implement a straight-forward cascade-delete option in ejb-jar.xml for a one-to-many relationship using EJB 2.1.

While the cascade-delete works well for a one-to-one relationship, it is throwing this error for one-to-many relationship.

DB used is Oracle 10g XE. Server is Weblogic 9.2 MP4.

Given below the exact error:

javax.ejb.EJBException: EJB Exception:: java.lang.IllegalArgumentException: [EJB:010142]Instance of EJB 'LineItem' with primary key 'li8' does not exist.
at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.remove(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:531)
at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.remove(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:496)
at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.clear(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:369)
at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS.__WL_superEjbRemove(Order_cpl9bk__WebLogic_CMP_RDBMS.java:1667)
at weblogic.ejb.container.manager.DBManager.remove(DBManager.java:1664)
at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:125)
at Test1.Order_cpl9bk_ELOImpl.remove(Order_cpl9bk_ELOImpl.java:577)
at jsp_servlet.__cascadedeletetest._jspService(__cascadedeletetest.java:198)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3272)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2019)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1394)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
; nested exception is: java.lang.IllegalArgumentException: [EJB:010142]Instance of EJB 'LineItem' with primary key 'li8' does not exist.
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:657)
at weblogic.ejb.container.internal.BaseEJBLocalHome.handleSystemException(BaseEJBLocalHome.java:150)
at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:132)
at Test1.Order_cpl9bk_ELOImpl.remove(Order_cpl9bk_ELOImpl.java:577)
at jsp_servlet.__cascadedeletetest._jspService(__cascadedeletetest.java:198)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3272)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2019)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1394)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
I have verified that the lineitem record that it is trying to delete is existing in the db table.

Please let me know what could be the possible issue.

Thanks,
Vinod
vinod sipivishta
Greenhorn

Joined: Nov 23, 2011
Posts: 2
any help on this would be appreciated
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [EJB:010142] error for cascade-delete
 
Similar Threads
deployment error ,jpa(wl10.3.3)
struts2 error
Issues with adding new method to remote interface and backward compatability
tag library doubt
java.lang.ClassCastException: Model.Employee cannot be cast to Model.Employee