0 Replies Latest reply on Feb 23, 2007 10:07 AM by Bernhard Donaubauer

    EJB 3.0 Informix Sequences Jboss

    Bernhard Donaubauer Newbie

      Hello!

      I try to EJB3.0 Jboss and informix sequences to work. If I try to deploy my Entity Bean I get an error telling me that my sequence does not exists.

      The first step was to find out how Jboss/Hibernate finds my sequences so I turned on SQL logging on the serverside. The Query JBoss/Hibernate started was:


      select tabname, tabtype, owner, tabid from informix.systables where tabtype in
      ('T') and tabname like 'lagerbestaende_seq' and owner like '%'

      This Query does not find my sequence because it is wrong!

      I modified it (replaced tabtype T by tabtype Q) and got the expected result:
      tabname lagerbestaende_seq
      tabtype Q
      owner informix
      tabid 415

      The second step was to find out how this query is created. I downloaded Hibernate and searched the sources. In ./src/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java there is a method initSequences() that calls dialect.getQuerySequencesString() but in InformixDialect.java there is no getQuerySequencesString() method defined. I think this causes my problems. There should be a getQuery...() Method delivering a
      SELECT statement like this:

      select tabname, tabtype, owner, tabid
      from systables
      where tabtype in ('Q')

      Is my analysis right? Is it a bug?

      Regards,
      Bernhard Donaubauer