4 Replies Latest reply on Oct 13, 2004 7:51 PM by Mark

    JBoss 4.0 and MySQL problem (non-standard SQL?)

    Mark Newbie

      I posted the following on the Persistence/JBoss forum, but maybe it suits better here.

      When trying to move to JBoss 4.0 I ran into a snag. ejb-deployer.xml in the deploy directory contains something that is probably not standard SQL:

      create table TIMERS (
      TIMERID varchar(50) not null,
      TARGETID varchar(50) not null,
      INITIALDATE timestamp not null,
      INTERVAL bigint,
      INSTANCEPK other,
      INFO other,
      constraint timers_pk primary key (TIMERID)

      This causes errors at JBoss startup.

      First of all, INTERVAL is a reserved word and MySQL barfs on it. Secondly, 'other' is not a type known to MySQL.

      Changing INTERVAL into TIMER_INTERVAL and 'other' into 'text' (as I had no clue what to change it into) seems to fix the problem.

      Or did it? Now I get a "Hibernate lazy instantiation problem" when I try to fetch my objects from the database through Hibernate. I don't get that problem with JBoss 3.2.5. What I did notice was that JBoss 4.0 came with its own hibernate2.jar, so I didn't copy it into the lib directory. I did copy the others related to Hibernate though.