Community
Participate
Working Groups
The following two new failures occurred with WDF testing on JavaSE against Oracle DB (11.1.0.7): 1. org.eclipse.persistence.testing.tests.wdf.jpa1.query.TestDeleteQuery.testDeleteAllDepartments 2. org.eclipse.persistence.testing.tests.wdf.jpa1.relation.TestBidirectionalManyToMany.testCascadeMerge The following are stack trace, same for both failures: javax.persistence.OptimisticLockException: Exception [EclipseLink-5011] (Eclipse Persistence Services - 2.3.0.v20110226-r9045): org.eclipse.persistence.exceptions.OptimisticLockException Exception Description: One or more objects cannot be updated because it has changed or been deleted since it was last read On the other hand, all wdf testing couldn't run on those application servers which only support JPA1.0 (not support JPA2.0, e.g. JBoss-5.1.0GA). The following are stack trace: javax.persistence.EntityManagerFactory.getCache()Ljavax/persistence/Cache; java.lang.NoSuchMethodError: javax.persistence.EntityManagerFactory.getCache()Ljavax/persistence/Cache; at org.eclipse.persistence.testing.framework.wdf.AbstractBaseTest.clearAllTables(AbstractBaseTest.java:376) at org.eclipse.persistence.testing.framework.wdf.AbstractBaseTest.clearAllTablesAndSetup(AbstractBaseTest.java:328) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.runChild(SkipBugzillaTestRunner.java:178) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.runChild(SkipBugzillaTestRunner.java:38) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.run(SkipBugzillaTestRunner.java:50) at org.eclipse.persistence.testing.framework.wdf.server.ServerTestRunnerImpl.runTestClass(ServerTestRunnerImpl.java:49) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37) at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54) at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
Created attachment 190297 [details] proposed patch avoiding to call JPA 2 methods on Java EE 5 servers The patch uses getDelegate and reflection to invoke JPA 2 methods Tested on JBoss 5.1 GA/Oracle 10
Tested on Oracle 11.1 with Oracle10Platform and Oracle11Platform Checked in at # 9072.
(In reply to comment #2) > Tested on Oracle 11.1 with Oracle10Platform and Oracle11Platform > Checked in at # 9072. The comment above is wrong. Correct is Test on - JBoss 5.1 (by Adrian) - WLS 10.3.4 (by Kevin) Checke in at # 9072.
The JPA 2.0 issue was fixed, but not the optimistic lock error, which is the reason for this bug.
I have retested this issue: the OLE reported here occurs with the Oracle10Platform or with the Oracle11Platfrom. Applpying the patch https://bugs.eclipse.org/bugs/attachment.cgi?id=190269 fixes the issue. With the generic OraclePlatfrom, the issue does not occur.
The two test issues, which occur on Oracle with the Oracle10Platform or Oracle11Platform, namely TestDeleteQuery.testDeleteAllDepartment and TestBidirectionalManyToMany.testCascadeMerge are addressed by the bug 338783. Hence I am closing this issue as duplicate of 338783. *** This bug has been marked as a duplicate of bug 338783 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink