dev@glassfish.java.net

Re: SQLAnywherePlatform Status Update

From: Lance J. Andersen <Lance.Andersen_at_Sun.COM>
Date: Mon, 08 Jan 2007 16:36:34 -0500

Hi Tom,

Tom Ware wrote:
> My concern related to checking in the current code is that there is
> already a SQLAnywherePlatform. As Markus has correctly pointed out,
> his design makes more sense because the current implementation is a
> subclass of the SybasePlatform and that does not reflect the reality
> of how SQLAnywhere is designed. For the JConnect case, however, the
> fact that we are currently a subclass of SybasePlatform likely
> benefits us.
Not sure I totally understand your point here, could you please explain?

Are you referring to the fact that jConnect with SQL Anywhere is
following the Sybase ASE code path? If so, then it is possible that
there is still a Toplink problem or a TDS ASA issue that needs followed
up on either way.

>
> Perhaps we could rename Markus' version of the platform to reflect the
> fact that is only covers the iAnywhere software, but I am somewhat
> concerned about adding extra classes if they are not needed since if
> we have too many platforms, it may become difficult for users to know
> what to use. Do you think it would make sense to users that we would
> represent SQLAnywhere in two different platforms?
SQLAnywhere is SQLAnywhere so we do not really want to treat it
differently between jConnect and using the iAnywhere driver. The code
should work the same in both regards. Now that being said, there could
be some optimizations that are not available when using TDS, but we
should be able to determine that based on the driver as we will know the
protocol it uses.
>
> As far as testing is concerned, the TopLink Essentials product has had
> limited testing with Sybase. The full TopLink product, however, uses
> basically the same platform code and has run through extensive testing
> on SybaseASE 12.5 using the JConnect 5.5 driver.
That is good to know. We do need a full compliance run with jConnect ,
especially against ASE 15 as i have encountered a couple of failures
with the DataDirect drivers with ASE 15 that i did not se with ASE 12.5
and i cannot figure out yet what is the difference or cause (though i
have a patch to workaround it from DataDirect).

RegardsLance
>
> -Tom
>
> Lance J. Andersen wrote:
>
>> Tom,
>>
>> I do not see a reason to not check in the code while other issues
>> are being addressed.
>>
>> It is important to support jConnect and SQLAnywhere's driver. Using
>> jConnect, you should be able to get the platform to behave like
>> Sybase ASE.
>>
>> The Sql Anywhere 10 docs are quite clear that both the jConnect and
>> the iAnywhere (jdbc-odbc bridge) driver are supported, so we
>> definitely want to get both of these humming.
>>
>> I also do not know if/when we have done a full test run of ASE using
>> jConnect 6.0.5, i know we have not done a full compliance run with
>> this driver so it is possible that the issues are generic.
>>
>>
>> SQL Anywhere has a very large install base and it will only benefit
>> continued JPA/toplink essentials adoption to get SQL Anywhere supported.
>>
>>
>>
>>
>> Tom Ware wrote:
>>
>>
>>> Hi Markus,
>>>
>>> After having talked to my some colleages on the project, I am
>>> concerned about the JConnect issues. I am not comfortable with
>>> checking in a SQLAnywherePlatform that does not support JConnect
>>> unless we can say one of the the following 2 things:
>>>
>>> 1. It is not possible to have an acceptable number of tests pass on
>>> both drivers
>>> 2. There is another strong architectural or technical reason why it
>>> does not make sense that SQLAnywherePlatform would support both
>>> JConnect and the driver that ships with the project.
>>>
>>> Is either of these things true?
>>>
>>> -Tom
>>>
>>>
>>> Tom Ware wrote:
>>>
>>>
>>>> Hi Markus,
>>>>
>>>> Could you please send your current implementation. I'll do my best
>>>> to get it running and take a quick look at the errors to see if I
>>>> can give you any hints.
>>>>
>>>> As far as the JConnect issue is concerned, lets release this
>>>> platform with the name we expect it to have in the end (rather than
>>>> some name we may change)? An enhancement can be filed to do the
>>>> work for JConnect. The detection mechanism can be updated if
>>>> necessary, but in the mean time, it is possible to specifiy
>>>> platforms that are not properly automatically detected using the
>>>> toplink.target-database persitence unit property with the fully
>>>> qualified DatabasePlatform subclass name as the value.
>>>>
>>>> -Tom
>>>>
>>>> Markus KARG wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Tom and Lance,
>>>>>
>>>>> so I have done my best to do all you told me. The new platform
>>>>> passes the FullRegressionTest suite with the following result:
>>>>> Runs 592/592, Errors 5, Failures 3 (see stack traces below).
>>>>> Please tell me how to proceed. Shall I send you the source code
>>>>> for a final code review?
>>>>>
>>>>> Lance, I have tested both, iAnywhere bridge (incl. latest EBF) and
>>>>> jConnect 6.0.5 (incl. latest EBF). The result for iAnywhere is to
>>>>> be found below. The result for jConnect 6.0.5 is that there are
>>>>> additional errors (all in all 21 errors!). Since I am not
>>>>> targeting jConnect, as it is not part of the SQL Anywhere Studio
>>>>> product but has to be obtained separately, I want to suggest the
>>>>> following: SQLAnywherePlatform in this first draw is using
>>>>> iAnywhere, as that is the driver found "in the box". Then, we ask
>>>>> the TopLink team to implement an improved search mechanism that
>>>>> also checks the name of the driver, not only the name of the
>>>>> product. If that is done, we create a new driver hierarchy:
>>>>> SQLAnywhere (abstract class, holding all SQL Anywhere specifics),
>>>>> extended by iAnywhereSQLAnywherePlatform (holding all iAnywhere
>>>>> specifics) and extended by jConnectSQLAnywherePlatform(holding all
>>>>> jConnect specifics, like the 21 errors). Tom and Lance, what do
>>>>> you think about that?
>>>>>
>>>>> Thanks a lot
>>>>> Markus
>>>>>
>>>>>
>>>>> (FAILURE 1)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite.testSerializedLazy(oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite)
>>>>>
>>>>> junit.framework.AssertionFailedError: The correct exception was
>>>>> not thrown while traversing an uninstantiated lazy relationship on
>>>>> a serialized object: null
>>>>> at junit.framework.Assert.fail(Assert.java:47)
>>>>> at junit.framework.Assert.assertTrue(Assert.java:20)
>>>>> at junit.framework.Assert.assertNotNull(Assert.java:220)
>>>>> at
>>>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.EntityManagerJUnitTestSuite.testSerializedLazy(EntityManagerJUnitTestSuite.java:2292)
>>>>>
>>>>>
>>>>> I don't know what to do to fix this. Can you give me some tips?
>>>>>
>>>>>
>>>>> (FAILURE 2)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.JoinedAttributeAdvancedJunitTest.testEmployeeJoinProjects(oracle.toplink.essentials.testing.tests.cmp3.advanced.JoinedAttributeAdvancedJunitTest)
>>>>>
>>>>> junit.framework.AssertionFailedError: PK = 222:
>>>>> Employee.manager.manager.manager.manager.projects: indirection
>>>>> instantiated != indirection NOT instantiated; .projects:
>>>>> indirection instantiated != indirection NOT instantiated; PK =
>>>>> 228: Employee.manager.projects: indirection instantiated !=
>>>>> indirection NOT instantiated; at
>>>>> junit.framework.Assert.fail(Assert.java:47)
>>>>> at
>>>>> oracle.toplink.essentials.testing.tests.cmp3.advanced.JoinedAttributeAdvancedJunitTest.testEmployeeJoinProjects(JoinedAttributeAdvancedJunitTest.java:517)
>>>>>
>>>>>
>>>>> I don't know what to do to fix this. Can you give me some tips?
>>>>>
>>>>>
>>>>> (FAILURE 3)
>>>>> oracle.toplink.essentials.testing.tests.ejb.ejbqltesting.JUnitEJBQLComplexTestSuite$1
>>>>>
>>>>> JUnitEJBQLComplexTestSuite
>>>>> complexResultPropertiesTest(oracle.toplink.essentials.testing.tests.ejb.ejbqltesting.JUnitEJBQLComplexTestSuite)
>>>>>
>>>>> junit.framework.AssertionFailedError: Query.setFirstResult Test
>>>>> Case Failed
>>>>> at junit.framework.Assert.fail(Assert.java:47)
>>>>> at junit.framework.Assert.assertTrue(Assert.java:20)
>>>>> at
>>>>> oracle.toplink.essentials.testing.tests.ejb.ejbqltesting.JUnitEJBQLComplexTestSuite.complexResultPropertiesTest(JUnitEJBQLComplexTestSuite.java:1009)
>>>>>
>>>>>
>>>>> We started the discussion on that yesterday, but still I do not
>>>>> see a problem on the SQL Anywhere JDBC driver's side. As
>>>>> DerbyPlatform doesn't show the problem, can you give me a tip what
>>>>> next to check? What can be the reason for the failure?
>>>>>
>>>>>
>>>>> (ERROR 1) Lob Model
>>>>> testUpdate(oracle.toplink.essentials.testing.tests.cmp3.lob.LobJUnitTestCase)
>>>>>
>>>>> javax.persistence.RollbackException: Exception [TOPLINK-4002]
>>>>> (Oracle TopLink Essentials - 9.1 (Build local)):
>>>>> oracle.toplink.essentials.exceptions.DatabaseException
>>>>> Internal Exception: java.sql.SQLException: Dieser Treiber
>>>>> unterstützt keinen JDBC-Datentyp mit ID = 2005Error Code: 0
>>>>> Call:UPDATE CMP3_IMAGE SET SCRIPT = ?, PICTURE = ? WHERE (ID = ?)
>>>>> bind => [null, null, 1000]
>>>>> Query:UpdateObjectQuery(oracle.toplink.essentials.testing.models.cmp3.lob.Image_at_14a4fd2)
>>>>>
>>>>> at
>>>>> oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:106)
>>>>>
>>>>> at
>>>>> oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:45)
>>>>>
>>>>> at
>>>>> oracle.toplink.essentials.testing.tests.cmp3.lob.LobJUnitTestCase.testUpdate(LobJUnitTestCase.java:132)
>>>>>
>>>>> oracle.toplink.essentials.testing.tests.cmp3.relationships.ExpressionJUnitTestSuite
>>>>>
>>>>> testLeftTrimWithTrimChar(oracle.toplink.essentials.testing.tests.cmp3.relationships.ExpressionJUnitTestSuite)
>>>>>
>>>>>
>>>>> I do not have any idea what the problem is, because the error
>>>>> message is not known in the SQL Anywhere manual. Do you have an
>>>>> idea what to do?
>>>>>
>>>>>
>>>>> (ERROR 2)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.relationships.ExpressionJUnitTestSuite.testLeftTrimWithTrimChar
>>>>>
>>>>>
>>>>> Filed as a bug report in the GF tracker. Ignored by me since it is
>>>>> not mandatory.
>>>>>
>>>>>
>>>>> (ERROR 3)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.relationships.ExpressionJUnitTestSuite.testTrimWithTrimChar
>>>>>
>>>>>
>>>>> Filed as a bug report in the GF tracker. Ignored by me since it is
>>>>> not mandatory.
>>>>>
>>>>>
>>>>> (ERROR 4)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.fieldaccess.relationships.ExpressionJUnitTestSuite.testLeftTrimWithTrimChar
>>>>>
>>>>>
>>>>> Filed as a bug report in the GF tracker. Ignored by me since it is
>>>>> not mandatory.
>>>>>
>>>>>
>>>>> (ERROR 5)
>>>>> oracle.toplink.essentials.testing.tests.cmp3.fieldaccess.relationships.ExpressionJUnitTestSuite.testTrimWithTrimChar
>>>>>
>>>>>
>>>>> Filed as a bug report in the GF tracker. Ignored by me since it is
>>>>> not mandatory.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>>
>>
>