Bug 260320 - testDDLUnidirectionalOneToMany failed on all application server
Summary: testDDLUnidirectionalOneToMany failed on all application server
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-01-07 16:07 EST by Kevin Yuan CLA
Modified: 2022-06-09 10:25 EDT (History)
0 users

See Also:


Attachments
add find() before remove in order to attached again inside container. (1.64 KB, application/octet-stream)
2009-06-22 11:59 EDT, Kevin Yuan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2009-01-07 16:07:44 EST
testDDLUnidirectionalOneToMany is a new test, which located in ddlgeneration test suite, it passed on J2SE, but failed on Server (inside container). The following is the Exceptions:

Entity must be managed to call remove: org.eclipse.persistence.testing.models.jpa.ddlgeneration.Comment@13a2d5f, try merging the detached and try the remove again.

java.lang.IllegalArgumentException: Entity must be managed to call remove: org.eclipse.persistence.testing.models.jpa.ddlgeneration.Comment@13a2d5f, try merging the detached and try the remove again.
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.performRemove(UnitOfWorkImpl.java:3323)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.remove(EntityManagerImpl.java:318)
at com.sun.enterprise.util.EntityManagerWrapper.remove(EntityManagerWrapper.java:274)
at org.eclipse.persistence.testing.tests.jpa.ddlgeneration.DDLGenerationJUnitTestSuite.testDDLUnidirectionalOneToMany(DDLGenerationJUnitTestSuite.java:430)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareServer(JUnitTestCase.java:391)
at org.eclipse.persistence.testing.framework.server.TestRunnerBean.runTest(TestRunnerBean.java:87)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:77)
at $Proxy117.runTest(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Comment 1 Kevin Yuan CLA 2009-06-22 11:59:08 EDT
Created attachment 139769 [details]
add find() before remove in order to attached again inside container.

add find() before remove in order to attached again inside container, just like the follwoing:
            CKeyEntityB b0 = em.find(CKeyEntityB.class, b.getKey());
            em.remove(b0.getComments().get(0));
            em.remove(b0.getComments().get(1));
            em.remove(b0);

Code reviewed by Yiping Zhao.
Check in revision: 4534
Comment 2 Kevin Yuan CLA 2009-06-22 12:03:49 EDT
The change with this test case had been checked into EclipseLink main (2.0).
Comment 3 Peter Krogh CLA 2009-08-26 09:46:00 EDT
Mass update to change fixed in target.
Comment 4 Peter Krogh CLA 2009-08-26 09:48:21 EDT
Mass update to change fixed in target.
Comment 5 Peter Krogh CLA 2009-08-26 09:52:54 EDT
Mass update to change fixed in target.
Comment 6 Peter Krogh CLA 2009-08-26 09:55:19 EDT
Mass update to change fixed in target.
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:16:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:25:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink