Issue Details (XML | Word | Printable)

Key: GLASSFISH-2431
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Mike Fitch
Reporter: mzh777
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
glassfish

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

Created: 15/Feb/07 01:13 PM   Updated: 06/Mar/12 09:59 PM
Component/s: docs
Affects Version/s: 9.1pe
Fix Version/s: not determined

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive pkGenIdentity.zip (13 kB) 15/Feb/07 01:16 PM - mzh777

Environment:

Operating System: All
Platform: All


Issuezilla Id: 2,431
Status Whiteboard:

as91ur1-na

Tags:
Participants: basler, lancea, Mike Fitch, Mitesh Meswani, mzh777, Paul Davies, sanandal, sherryshen and Tom Mueller


 Description  « Hide

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.



mzh777 added a comment - 15/Feb/07 01:16 PM

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


mzh777 added a comment - 15/Feb/07 01:22 PM

Added Mitesh and Marina to the cc list.


Mitesh Meswani added a comment - 15/Feb/07 03:10 PM

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


lancea added a comment - 21/Mar/07 02:48 PM

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.


sherryshen added a comment - 24/Jul/07 06:47 PM

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!


sherryshen added a comment - 26/Jul/07 06:16 PM

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


basler added a comment - 12/Nov/07 08:22 AM

Not a as91ur1 show stopper.


sanandal added a comment - 11/Jan/09 07:01 AM

"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."


Paul Davies added a comment - 26/May/11 04:33 PM

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


Tom Mueller added a comment - 06/Mar/12 09:59 PM

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