3 Replies Latest reply on May 11, 2002 6:43 AM by svevor

    CMP2 Problem with mysql

    svevor

      I have this problem in jboss-3RC2 + tomcat
      Can anybody help with where to look at. I know it has to do
      wiht database. It work with hypersonic, but not with
      mysql or postgresql
      Thanks.
      06:40:23,523 INFO [OrderBean] Created table 'OrderBean' successfully.
      06:40:23,732 ERROR [EntityContainer] Exception in service lifecyle operation: start
      06:40:23,739 ERROR [STDERR] java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near 'order VARCHA
      R(255) BINARY, CONSTRAINT pk_LineItemBean PRIMARY KEY (lineItemID))' at line 1
      06:40:23,741 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
      06:40:23,742 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
      06:40:23,743 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sqlQuery(Unknown Source)

        • 1. Re: CMP2 Problem with mysql
          davidjencks

          order is an sql reserved word in most sql implementations. Looks like you have a column named order.

          • 2. Re: CMP2 Problem with mysql
            svevor

            I have no column named order in any of my three CMP beans, however i have <cmr-field-name>order</cmr-field-name>
            as relation "one to many" between two CMP beans.
            And for hypersonic it works. All three tables are created,
            but with mysql or postgresql it does't.
            Thanks.

            • 3. Re: CMP2 Problem with mysql
              svevor

              Thank you very much David, i change cmr fild from order(
              looks like it reserved word for mysql and postgres)
              and now my CMP bean are working.