Community
Participate
Working Groups
This test failed with "table or view does not exist", table "TMP_VEHICLE_PROFILE" seems not to be created successfully. The following are stack trace: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20100616-r7618): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'eclipselink3.TMP_VEHICLE_PROFILE' doesn't exist Error Code: 1146 Call: DELETE FROM TMP_VEHICLE_PROFILE WHERE (VEHICLE_ID = ?) bind => [1] Query: DataModifyQuery(sql="DELETE FROM TMP_VEHICLE_PROFILE WHERE (VEHICLE_ID = ?)") javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20100616-r7618): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'eclipselink3.TMP_VEHICLE_PROFILE' doesn't exist Error Code: 1146 Call: DELETE FROM TMP_VEHICLE_PROFILE WHERE (VEHICLE_ID = ?) bind => [1] Query: DataModifyQuery(sql="DELETE FROM TMP_VEHICLE_PROFILE WHERE (VEHICLE_ID = ?)") at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63) at org.eclipse.persistence.testing.tests.wdf.jpa1.foreignkeys.TestForeignKeys.testInheritance(TestForeignKeys.java:456) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.runChild(SkipBugzillaTestRunner.java:176) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.runChild(SkipBugzillaTestRunner.java:37) at org.eclipse.persistence.testing.framework.wdf.SkipBugzillaTestRunner.run(SkipBugzillaTestRunner.java:49) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20100616-r7618): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'eclipselink3.TMP_VEHICLE_PROFILE' doesn't exist Error Code: 1146 This test failed on both MySQL and Oracle, haven't tried to run on other database yet.
Setting initial target and priority. Please feel free to change either of these values when you know what the target is.
Setting target and priority.
The issue firstly occured after the change 7598: bug 303514. However, I assume that change 7598 did not introduce this issue but merely makes it visible: In the test model "jpa1testmodel" of the test suite eclipselink.jpa.wdf.test, there is an entity org.eclipse.persistence.testing.models.wdf.jpa1.employee.Vehicle. Vehicle has a many-to-many relationship with the entity org.eclipse.persistence.testing.models.wdf.jpa1.employee.TravelProfile. This relationship is mapped through a join table "TMP_VEHICLE_PROFILE". EclipseLink's forward mapper fails to create this join table. In the test suite, the relationship in question is not used. Hence, it was not noticed that the table "TMP_VEHICLE_PROFILE" is not created. However, change 5798 fixes the issue reported by bug 303514: "ManyToMany JoinTable record is not being deleted when the mapping is inherited. Now, it is correctly atempted to deleted join table records in the table "TMP_VEHICLE_PROFILE" which EclipseLink failed to create. Hence the error reported here occurs.
Created attachment 174173 [details] work around until original issue is solved Until the cause of this issue (317448: BINARY column not properly created by forward mapper) is solved I am proposing the following work around: Specify the column definition for MySQL. (This will work on MySQL only.) In the test model, I had to make the relationship Employee.automobile transient as EclipseLink does not like cyclic foreign keys constraints.
workaround checked in in trunk at rev # 7814
Created attachment 174439 [details] additional patch fixing issue on Oracle The patch introduces a dscriptor customizer allowing to adjust the columnDefiniton for BINARY columns in a database-specific way.
Reopened due to the issue on Oracle.
Created attachment 174513 [details] additional patch fixing tests on Oracle, SQL Server and MaxDB This patch uses a descriptor customizer to allow mapping byte[] to BINARY columns and char[] arrays to VARCHAR columns in a database specific way. The patch is kind of lengthy as I hit organize imports on the project ;-). Tested on the following platforms: MySQL: OK (822 tests) Oracle: OK (820 tests) SQL Server: OK (818 tests) MaxDB: OK (815 tests)
https://bugs.eclipse.org/bugs/attachment.cgi?id=174513&action=edit Checked in at 7843
Apparently, the same problem exists in 2.1.1.
Created attachment 176709 [details] patch for tests in 2.1
fix checked into 2.1.1
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink