Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370995

Summary: bunch of jpa tests in DDLGenerationTestSuite failed on DB2 9.7 only
Product: z_Archived Reporter: Yiping Zhao <yiping.zhao>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christopher.delahunt, jamesssss, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: db2

Description Yiping Zhao CLA 2012-02-08 14:21:46 EST
There are 23 tests failed on DB2 due to changes Chris made on Feb 2 in DDLGenerationTestSuite, the test failures look like following:

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120208-r10820): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DEV2.DDL_EMK, DRIVER=4.7.85 Error Code: -204 Call: INSERT INTO DDL_EMK (ID) VALUES (?) bind => [1 parameter bound] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.ddlgeneration.EntityMapKey@2)

You can also see the detailed error message here:

http://ottvm054.ca.oracle.com/eclipselink/main/2012-02-08/jpa-eclipselink.jpa.test-test-lrg-jdk16-db2-9-universal-bug.html
Comment 1 Yiping Zhao CLA 2012-04-04 10:13:29 EDT
With today's result, the following three tests in Edwin's newly enabled testsuite DDLGenerationExtendTablesJUnitTestSuite failed:

1.testDDLUniqueKeysAsJoinColumns

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120404-r11117): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=B_CODE, DRIVER=4.7.85 Error Code: -206 Call: INSERT INTO DDL_CKENTA (L_NAME, SEQ, F_NAME, B_CODE, B_SEQ, B_UNQ2, B_UNQ1) VALUES (?, ?, ?, ?, ?, ?, ?) bind => [Kim, 52, Wonseok, null, null, u0002, u0001] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.ddlgeneration.CKeyEntityA@f8dc1d4)

2. testManyToManyWithMultipleJoinColumns

Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=B_UNQ2, DRIVER=4.7.85 Error Code: -206 Call: SELECT L_NAME, SEQ, F_NAME, B_CODE, B_SEQ, B_UNQ2, B_UNQ1 FROM DDL_CKENTA WHERE ((B_UNQ2 = ?) AND (B_UNQ1 = ?)) bind => [testManyToManyWithMultipleJoinColumns_1_2, testManyToManyWithMultipleJoinColumns_1_1] Query: ReadObjectQuery(name="uniqueA" referenceClass=CKeyEntityA sql="SELECT L_NAME, SEQ, F_NAME, B_CODE, B_SEQ, B_UNQ2, B_UNQ1 FROM DDL_CKENTA WHERE ((B_UNQ2 = ?) AND (B_UNQ1 = ?))")

3. testPrimaryKeyJoinColumns

Error persisting new country with city, states and zips : javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120404-r11117): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=NAME, DRIVER=4.7.85 Error Code: -206 Call: INSERT INTO Countries (iso_code, name) VALUES (?, ?) bind => [840, USA] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.ddlgeneration.Country@2e769cb)
Comment 2 James Sutherland CLA 2012-06-05 14:21:37 EDT
Issue was DDL extend was not check schema, so column in other schema were picked up.  Fixed to check schema if determinable.

See bug#321649 for patch file.
Comment 3 James Sutherland CLA 2012-06-14 15:37:41 EDT
Fixed
Comment 4 Chris Delahunt CLA 2012-10-02 16:52:51 EDT
backported changes to check for the schema in TableCreator.java to 2.4.1
Comment 5 Chris Delahunt CLA 2012-10-02 16:53:55 EDT
*** Bug 390859 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:30:16 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink