Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370995 - bunch of jpa tests in DDLGenerationTestSuite failed on DB2 9.7 only
Summary: bunch of jpa tests in DDLGenerationTestSuite failed on DB2 9.7 only
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: db2
Keywords:
: 390859 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-08 14:21 EST by Yiping Zhao CLA
Modified: 2022-06-09 10:30 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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