3 Replies Latest reply on Oct 26, 2004 9:54 AM by pablojavierpy

    Sybase IDENTITY columns

    pablojavierpy

      Dear all,

      Using:

      JBOSS 3.2.6 (linux)
      J2SDK-1.4.2_05 (sun's jvm)
      Sybase ASE Express 12.5 (linux)

      I spent the last three days trying to make "IDENTITY" columns work in Sybase.

      First, tried to use it with "auto-increment" set in the deployment descriptor. No luck! Got a "auto-increment template not found" exception.

      So, I added "<auto-increment-template>?1 IDENTITY</auto-increment-template>" in standardjbosscmp-jdbc.xml file and, of course, restarted jboss.

      After that, table creations failed because it was trying to make this:

      create table foo (foo_id not null IDENTITY)

      and Sybase does not like IDENTITY keyword after NOT NULL keyword.

      Bad luck.

      So I removed auto-increment from deployment descriptor and use "NUMERIC(15) IDENTITY" all together as "sql-type" in the deployment descriptor. No luck again, because, when creating relations, table creation attempted to create several "IDENTITY" columns :(

      I think I have tried it all.

      Is it impossible to use Sybase's IDENTITY columns with CMP EJBs in Jboss 3.2.x???

      What can I try?

      Anyone?

      Thanks in advance...