Bug 290264 - six new test in jpa.jpql.JUnitJPQLComplexTestSuite failed on JBoss
Summary: six new test in jpa.jpql.JUnitJPQLComplexTestSuite failed on JBoss
Status: CLOSED 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-09-23 09:48 EDT by Kevin Yuan CLA
Modified: 2022-06-09 10:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2009-09-23 09:48:46 EDT
The following six new tests added in EclipseLink 2.0 failed on JBoss:
    mapContainerPolicyMapValueInSelectTest
    mapContainerPolicyMapEntryInSelectTest
    mapContainerPolicyMapKeyInSelectionCriteriaTest
    mapContainerPolicyMapValueInSelectionCriteriaTest
    mappedKeyMapContainerPolicyMapKeyInSelectTest
    complexIndexOfInWhereClauseTest
The following are exceptions:

  <testcase classname="org.eclipse.persistence.testing.tests.jpa.jpql.JUnitJPQLComplexTestSuite" name="mapContainerPolicyMapEntryInSelectTest" time="0.094">
    <error message="Application error: BMT stateless bean TestRunner should complete transactions before returning (ejb1.1 spec, 11.6.1)" type="javax.ejb.EJBException">javax.ejb.EJBException: Application error: BMT stateless bean TestRunner should complete transactions before returning (ejb1.1 spec, 11.6.1)
	at org.jboss.ejb3.tx.StatelessBMTInterceptor.checkStatelessDone(StatelessBMTInterceptor.java:94)
	at org.jboss.ejb3.tx.StatelessBMTInterceptor.handleInvocation(StatelessBMTInterceptor.java:118)
	at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:55)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
	at org.jboss.remoting.Client.invoke(Client.java:1724)
	at org.jboss.remoting.Client.invoke(Client.java:629)
	at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
	at $Proxy3.invoke(Unknown Source)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareClient(JUnitTestCase.java:419)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:393)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareClient(JUnitTestCase.java:419)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:393)
</error>
  </testcase>

If I add try-catch block and commit transaction before returning, I got "unique constraint" problem just like the following:

<error message="Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (QA2.SYS_C0033144407) violated

Error Code: 1
Call: INSERT INTO CMP3_BLUE (ID, ALCOHOL_CONTENT, UNIQUEKEY, VERSION, C_ID, DTYPE) VALUES (?, ?, ?, ?, ?, ?)
	bind =&gt; [51, 5, 1, 2009-09-22 13:52:27.486907, 51, Blue]
Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.inherited.Blue@1d9db02)" type="javax.persistence.PersistenceException">javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (QA2.SYS_C0033144407) violated

Error Code: 1
Call: INSERT INTO CMP3_BLUE (ID, ALCOHOL_CONTENT, UNIQUEKEY, VERSION, C_ID, DTYPE) VALUES (?, ?, ?, ?, ?, ?)
	bind =&gt; [51, 5, 1, 2009-09-22 13:52:27.486907, 51, Blue]
Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.inherited.Blue@1d9db02)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:612)
	at org.jboss.jpa.tx.TransactionScopedEntityManager.flush(TransactionScopedEntityManager.java:216)
	at org.eclipse.persistence.testing.tests.jpa.jpql.JUnitJPQLComplexTestSuite.mapContainerPolicyMapValueInSelectTest(JUnitJPQLComplexTestSuite.java:1824)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareServer(JUnitTestCase.java:427)
	at org.eclipse.persistence.testing.framework.server.TestRunnerBean.runTest(TestRunnerBean.java:87)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
	at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
	at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
	at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
	at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)

Notes: These tests also failed on OC4J 10.1.3.5, and had been comment out, but these tests passed on WLS/WAS/Glassfish.
Comment 1 Kevin Yuan CLA 2010-07-19 16:02:16 EDT
Add flag "isJPA10()" in test suite level to skip all JPA2.0 tests on only JPA1.0 supported application servers, e.g. JBoss-5.1.0.GA, GlassFish-v2, WLS-10.3.3 and previous versions.

Code reviewed by Yiping Zhao.
Checked in trunk (2.2.0), revision:  7870.
Back port to 2.1.1, revision: 7871
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:32:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink