glassfish
  1. glassfish
  2. GLASSFISH-2431

[UB]Errors on generating identity primary key with Sybase data direct driver

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.1pe
    • Fix Version/s: not determined
    • Component/s: docs
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2,431
    • Status Whiteboard:
      Hide

      as91ur1-na

      Show
      as91ur1-na

      Description

      Build AS9.1 beta 33c.

      The data direct driver packaged in the AS9.1 beta is version 3.60.7. When this
      driver is used in generating identity primary key, exceptions were thrown:
      [java] Exception Description: Cannot persist detached object
      [ejb30.persistence.datatypes.ejb.DataTypes@738d08].
      [java] Class> ejb30.persistence.datatypes.ejb.DataTypes Primary Key> [0]
      [java] at
      oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist
      (EntityManagerImpl.java:193)
      [java] at
      ejb30.persistence.datatypes.client.TestOutsideContainer.createDataTypes(Unknown
      Source)
      ...

      When switched to use sybase j-connect driver (jconn2.jar), the same test passed.

        Activity

        mzh777 created issue -
        Hide
        mzh777 added a comment -

        Created an attachment (id=740)
        PK Identity generation test

        Show
        mzh777 added a comment - Created an attachment (id=740) PK Identity generation test
        Hide
        mzh777 added a comment -

        Added Mitesh and Marina to the cc list.

        Show
        mzh777 added a comment - Added Mitesh and Marina to the cc list.
        Hide
        Mitesh Meswani added a comment -

        The test uses following table
        CREATE TABLE DATATYPES (ID INTEGER IDENTITY NOT NULL,......)

        After inserting data into the table, Toplink is using SELECT @@IDENTITY to
        retrieve the value of inserted ID column. I think datadirect is misbehaving here

        Show
        Mitesh Meswani added a comment - The test uses following table CREATE TABLE DATATYPES (ID INTEGER IDENTITY NOT NULL,......) After inserting data into the table, Toplink is using SELECT @@IDENTITY to retrieve the value of inserted ID column. I think datadirect is misbehaving here
        Hide
        lancea added a comment -

        This issue is a bit ugly but turns out to be the result of the default behavior for
        DataDirect drivers on Sybase where it creates a stored procedure for every
        parameterized PreparedStatement.

        To change the default driver behavior, set the following property:

        PrepareMethod=direct

        This disables the creation of the stored procedures.

        Show
        lancea added a comment - This issue is a bit ugly but turns out to be the result of the default behavior for DataDirect drivers on Sybase where it creates a stored procedure for every parameterized PreparedStatement. To change the default driver behavior, set the following property: PrepareMethod=direct This disables the creation of the stored procedures.
        Hide
        sherryshen added a comment -

        The problem still exists in 9.1pe_b55 promoted.
        Can this solution or workaround be documented?
        e.g.
        With Sybase DD driver, set "PrepareMethod=direct" property in
        domain.xml when ... ??? (generating identity primary key).
        Thanks!

        Show
        sherryshen added a comment - The problem still exists in 9.1pe_b55 promoted. Can this solution or workaround be documented? e.g. With Sybase DD driver, set "PrepareMethod=direct" property in domain.xml when ... ??? (generating identity primary key). Thanks!
        Hide
        sherryshen added a comment -

        Re-open it for docs after Ming and I discussed it with Lance.

        Show
        sherryshen added a comment - Re-open it for docs after Ming and I discussed it with Lance.
        Hide
        basler added a comment -

        Not a as91ur1 show stopper.

        Show
        basler added a comment - Not a as91ur1 show stopper.
        Hide
        sanandal added a comment -

        "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
        release whose primary release driver is SailFin.
        This issue will be scrubbed after this release and will be given the right
        priority for the next release."

        Show
        sanandal added a comment - "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1 release whose primary release driver is SailFin. This issue will be scrubbed after this release and will be given the right priority for the next release."
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 2431 34035
        Hide
        Paul Davies added a comment -

        Mike, please determine if this issue should be fixed in 3.1.1, resolved, or closed.

        Show
        Paul Davies added a comment - Mike, please determine if this issue should be fixed in 3.1.1, resolved, or closed.
        Paul Davies made changes -
        Assignee lancea [ lancea ] Mike Fitch [ oncered ]
        Paul Davies made changes -
        Summary Errors on generating identity primary key with Sybase data direct driver [UB]Errors on generating identity primary key with Sybase data direct driver
        Fix Version/s 3.1.1 [ 14740 ]
        Fix Version/s 9.1pe [ 10974 ]
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Tom Mueller made changes -
        Fix Version/s not determined [ 11149 ]
        Fix Version/s 3.1.1 [ 14740 ]

          People

          • Assignee:
            Mike Fitch
            Reporter:
            mzh777
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: