persistence@glassfish.java.net

Re: 2 failures of entity-persistence-tests on Derby

From: Andrei Ilitchev <andrei.ilitchev_at_oracle.com>
Date: Tue, 13 Mar 2007 09:47:22 -0400

testUpdateUsingTempStorageWithParameter fails on Derby because somebody
overrode my recent changes to DB2Platform.
Re-applied my changes back to DB2Platform. The test is passing now.

----- Original Message -----
From: "Andrei Ilitchev" <andrei.ilitchev_at_oracle.com>
To: <persistence_at_glassfish.dev.java.net>
Sent: Monday, March 12, 2007 10:18 AM
Subject: Re: 2 failures of entity-persistence-tests on Derby


>I look at this right away.
> ----- Original Message -----
> From: "Michael Bouschen" <Michael.Bouschen_at_Sun.COM>
> To: <persistence_at_glassfish.dev.java.net>
> Cc: "Andrei Ilitchev" <andrei.ilitchev_at_oracle.com>; "Christopher Delahunt"
> <christopher.delahunt_at_oracle.com>
> Sent: Monday, March 12, 2007 9:14 AM
> Subject: Re: 2 failures of entity-persistence-tests on Derby
>
>
>> Hi,
>>
>> I see the same two errors when running the entity-persistent-tests on
>> derby.
>>
>> Regards Michael
>>
>>> Hello, Marina
>>>
>>> Of course I'm running on Derby Network Server. :-)
>>>
>>> Yes, it's strange the same exception is being thrown as the issue 1451
>>> with 1451 fix.
>>> Here is the root cause exception:
>>>
>>> oracle.toplink.essentials.exceptions.DatabaseException
>>> Internal Exception: org.apache.derby.client.am.SqlException: Syntax
>>> error: Encountered "NULL" at line 1, column 111.Error Code: -1
>>> Call:INSERT INTO session.TL_CMP3_EMPLOYEE (EMP_ID, VERSION, ADDR_ID,
>>> ROOM_NUM) SELECT t0.EMP_ID, (t0.VERSION + 1), NULL, t1.SALARY FROM
>>> CMP3_EMPLOYEE t0, CMP3_SALARY t1 WHERE ((t0.F_NAME =
>>> 'testUpdateUsingTempStorage') AND (t1.EMP_ID = t0.EMP_ID))
>>> Query:UpdateAllQuery()
>>> at
>>> oracle.toplink.essentials.exceptions.DatabaseException.sqlException
>>> (DatabaseException.java:295)
>>> at
>>> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:639)
>>> at
>>> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect
>>> (DatabaseAccessor.java:688)
>>> at
>>> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:477)
>>> at
>>> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall
>>> (DatabaseAccessor.java:437)
>>> at
>>> oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:675)
>>> at
>>> oracle.toplink.essentials.internal.sessions.IsolatedClientSession.executeCall
>>> (IsolatedClientSession.java:135)
>>> at
>>> oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
>>> at
>>> oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.updateAllUsingTempTables
>>> (DatasourceCallQueryMechanism.java:749)
>>> at
>>> oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.updateAll(DatasourceCallQueryMechanism.java:711)
>>> at
>>> oracle.toplink.essentials.queryframework.UpdateAllQuery.executeDatabaseQuery
>>> (UpdateAllQuery.java:165)
>>> at
>>> oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
>>> at
>>> oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java
>>> :536)
>>> at
>>> oracle.toplink.essentials.queryframework.ModifyAllQuery.executeInUnitOfWork(ModifyAllQuery.java:153)
>>> at
>>> oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java
>>> :2219)
>>> at
>>> oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
>>> at
>>> oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
>>> at
>>> oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeUpdate(EJBQueryImpl.java:372)
>>> at
>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite.internalUpdateUsingTempStorage
>>> (EntityManagerJUnitTestSuite.java:3204)
>>> Caused by: org.apache.derby.client.am.SqlException: Syntax error:
>>> Encountered "NULL" at line 1, column 111.
>>> at org.apache.derby.client.am.Statement.completeSqlca (Unknown
>>> Source)
>>> at
>>> org.apache.derby.client.am.Statement.completeExecuteImmediate(Unknown
>>> Source)
>>> at
>>> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(Unknown
>>> Source)
>>> at
>>> org.apache.derby.client.net.NetStatementReply.readExecuteImmediate
>>> (Unknown Source)
>>> at
>>> org.apache.derby.client.net.StatementReply.readExecuteImmediate(Unknown
>>> Source)
>>> at
>>> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(Unknown
>>> Source)
>>> at org.apache.derby.client.am.Statement.readExecuteImmediate
>>> (Unknown Source)
>>> at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
>>> at org.apache.derby.client.am.Statement.executeUpdateX(Unknown
>>> Source)
>>> at org.apache.derby.client.am.Statement.executeUpdate (Unknown
>>> Source)
>>> at
>>> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:630)
>>>
>>>
>>> On 3/11/07, * Marina Vatkina* <Marina.Vatkina_at_sun.com
>>> <mailto:Marina.Vatkina_at_sun.com>> wrote:
>>>
>>> This is really strange as the issue 1451 was a fix for Derby.
>>>
>>> Wonseok, are you using an embedded or a server mode for Derby?
>>>
>>> thanks,
>>> -marina
>>>
>>> Wonseok Kim wrote:
>>> > Hi, Andrei and Chris
>>> >
>>> > On Derby I'm hitting 2 failures which seem to be derived from
>>> recent
>>> > changes.
>>> >
>>> > Testcase: testUpdateUsingTempStorageWithParameter took 0.15 sec
>>> > FAILED
>>> > Exception thrown: class
>>> > oracle.toplink.essentials.exceptions.DatabaseException
>>> > junit.framework.AssertionFailedError: Exception thrown: class
>>> > oracle.toplink.essentials.exceptions.DatabaseException
>>> > at
>>> >
>>>
>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite.internalUpdateUsingTempStorage
>>>
>>> > (EntityManagerJUnitTestSuite.java:3213)
>>> > at
>>> >
>>>
>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite.testUpdateUsingTempStorageWithParameter(EntityManagerJUnitTestSuite.java
>>> :3159)
>>> > at
>>> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>>> > at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>>> > at junit.extensions.TestSetup.run(TestSetup.java:23)
>>> >
>>> > Testcase: unknown took 0 sec
>>> > FAILED
>>> > Warning, RAW type used for Primary keys only supported on Oracle
>>> > junit.framework.AssertionFailedError: Warning, RAW type used for
>>> Primary
>>> > keys only supported on Oracle
>>> > at
>>> >
>>>
>>> oracle.toplink.essentials.testing.tests.cmp3.datatypes.arraypks.PrimitiveArrayPKCachingJUnitTestCase$1.setUp
>>> > (PrimitiveArrayPKCachingJUnitTestCase.java:46)
>>> > at junit.extensions.TestSetup$1.protect (TestSetup.java:18)
>>> > at junit.extensions.TestSetup.run(TestSetup.java:23)
>>> >
>>> > The first test was added with the fix of issue 1451 by Andrei.
>>> Is this
>>> > test expected to work on Derby?
>>> >
>>> > The second test appears to be intended only for Oracle, but
>>> which was
>>> > added to FullRegressionTestSuite like below. Shouldn't this test
>>> skip in
>>> > case of other database?
>>> >
>>>
>>> http://fisheye5.cenqua.com/changelog/glassfish/entity-persistence-tests?cs=MAIN:chris_delahunt:20070309151945
>>> >
>>> > Thanks,
>>> > -Wonseok
>>>
>>>
>>
>>
>