Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: AW: [eclipselink-dev] AW: bug 317197

Hi Andrei, all,
 
hm, so I understand that you are rejecting the proposed patch. :-(
 
 
The tests need a binary comparable non-LOB column. I don't think this is a bad thing to use as the EclipseLink runtime can deal with it. It is an issue for the forward mapper only.
 
Changing the field definition would not help, I am affraid: My understanding is that MySQL has six different binary types:
 
4 non-comparable LOB types:TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB. The BLOB types can take up to 2^8, 2^16, 2^24 and 2^32 bytes, respectively. But they don't have a length argument.
 
comparable non-LOB types: BINARY, VARBINARY, which can take up to 256 bytes. BINARY and VARBINARY require a length argument.
 
The distinction between LOB and non-LOB is orthogonal to the length, I'd say. There should be distinct field-definitions for LOB types and for non-LOB types. But there aren't.
 
 
The patch I was proposing tackles the issue the tests are facing using a column definiton + descriptor customizer. I agree with you that we should rather fix the underlying issue instead of introducing a workaround in the tests. But the tests are broken on Oracle currently and I'd rather get them up and running before we tackle the more complicated issue addressed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=317597.
 
 
@All, what do you think about this? 
 
Is it OK to firstly work around 317597 by using a columnDefinition as proposed by https://bugs.eclipse.org/bugs/attachment.cgi?id=174439&action="">? 
 
Or should we tackle 317597 directly? In this case the WDF tests would likely remain broken on Oracle for a while.
 
Regards, 
 
Adrian
 
 

Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany

Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Léo Apotheker (stellvertretender Sprecher/Deputy CEO), Werner Brandt, Claus Heinrich, Gerhard Oswald, John Schwarz, Peter Zencke

Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269

 


Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Andrei Ilitchev
Gesendet: Freitag, 16. Juli 2010 00:12
An: Dev mailing list for Eclipse Persistence Services
Betreff: Re: AW: [eclipselink-dev] AW: bug 317197

It looks like the real culprit is bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317448 - JPA forward mapper fails to create join table

It seems that table creation on MySQL always requires field size for LONGBLOB.
That should be fixed in MySQLPlatform.buildFieldTypes method:
the FieldTypeDefinitions for LONGBLOB (what about LONGTEXT?) should be changed to allow size, and should specify default size (what would be a reasonable value?)

from:
        fieldTypeMapping.put(byte[].class, new FieldTypeDefinition("LONGBLOB", false));
to:
        fieldTypeMapping.put(byte[].class, new FieldTypeDefinition("LONGBLOB", 16));

The latter would indicate that the size is required, and if not provided then the default value will be used.

On 15/07/2010 3:37 PM, Goerler, Adrian wrote:
Hi Andrei, all,
 
 
 
 
The patch uses a descriptor customizer in order to specify the column definittion for the binary column in a database-specific way.
 
I have tested this on MySQL and Oracle. Likely, it needs to be extended to cover more database dialects.
 
Could you please have a look?
 
 
Regards,
 
Adrian
 
 


Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Andrei       
Gesendet: Donnerstag, 15. Juli 2010 16:37
An: Dev mailing list for Eclipse Persistence Services
Betreff: Re: [eclipselink-dev] AW: bug 317197

Hi Adrian,

Starting yesterday (Wed. July 14th) I am getting lots of errors (146 errors 4 failures) when I run test-wdf on Oracle, yet official build results are clean.

It seems all the errors are the same - table doesn't exist. It look like:

Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist Error Code: 942 Call: SELECT t1.ID, t1.LASTNAME, t1.FIRSTNAME, t1.SALARY, t1.SAMPLE_ACCOUNT, t1.PROFILE_GUID, t1.DEPARTMENT, t1.COSTCENTER, t1.CUBICLE_FLOOR, t1.CUBICLE_PLACE, t1.BROKERAGE_ACCOUNT, t1.EMP_START, t1.EMP_END FROM TMP_EMP_BICYCLE t0, TMP_EMP t1 WHERE ((t0.BICYCLE_ID = ?) AND (t1.ID = t0.EMPLOYEE_ID)) bind => [7] Query: ReadAllQuery(name="riders" referenceClass=Employee sql="SELECT t1.ID, t1.LASTNAME, t1.FIRSTNAME, t1.SALARY, t1.SAMPLE_ACCOUNT, t1.PROFILE_GUID, t1.DEPARTMENT, t1.COSTCENTER, t1.CUBICLE_FLOOR, t1.CUBICLE_PLACE, t1.BROKERAGE_ACCOUNT, t1.EMP_START, t1.EMP_END FROM TMP_EMP_BICYCLE t0, TMP_EMP t1 WHERE ((t0.BICYCLE_ID = ?) AND (t1.ID = t0.EMPLOYEE_ID))")

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

or

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist Error Code: 942 Call: INSERT INTO TMP_EMP (ID, LASTNAME, FIRSTNAME, SALARY, SAMPLE_ACCOUNT, PROFILE_GUID, DEPARTMENT, COSTCENTER, CUBICLE_FLOOR, CUBICLE_PLACE, BROKERAGE_ACCOUNT, EMP_START, EMP_END) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [1234, Mouse, Mighty, null, null, null, null, null, null, null, null, null, null] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.wdf.jpa1.employee.Employee@1de6ff8)

javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

Any idea what that might be?

Thanks,

Andrei


eclipselink.jpa.wdf.test\reports\*.* is attached


On 14/07/2010 7:30 AM, Goerler, Adrian wrote:
Hi,
 
 
reviewed by Kevin and checked in in trunk at # 7814,
 
-Adrian
 


Von: Kevin Yuan [mailto:kevin.yuan@xxxxxxxxxx]
Gesendet: Dienstag, 13. Juli 2010 19:15
An: Goerler, Adrian
Cc: eclipselink-dev@xxxxxxxxxxx
Betreff: Re: bug 317197

Hi Adrian,
The patch for this workaround are fine for me.

Thanks,
Kevin

On 13/07/2010 12:51 PM, Goerler, Adrian wrote:
Hi Kevin,
 
 
I am proposing a workaround for the failing WDF tests until the issue 317448 is solved.
 
The workaround uses a columnDefinition and hence will work on MySQL only, I am afraid.
 
Could you please have a look?
 
Thanks,
 
Adrian
 
SAP AG
Dietmar-Hopp-Allee 16, 69190 Walldorf, Germany
 
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Léo Apotheker (stellvertretender Sprecher/Deputy CEO), Werner Brandt, Claus Heinrich, Gerhard Oswald, John Schwarz, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269
 
 

_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev

_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev

Back to the top