2 Replies Latest reply on May 3, 2004 1:55 AM by vmoreno

    Unexpected token: BINARY in statement

    vmoreno

      Hello all,

      I am using with success entity ejbs for data model.
      Single objects and relation 1:many.
      With jboss3.2.3 and mysql over linux.

      Thats is ok.
      Now, I have a many:many relation between two entities.
      Both entities are created correctly at DB, the many:many relationship is
      automatically created by a third table.
      When starting I go the following error when trying to deploy this third table:

      org.jboss.deployment.DeploymentException: Error while creating table MSISDN_BATCH_BATCH_MSISDN_BATCH; - nested throwable: (java.sql.SQLException: Unexpected token: BINARY in statement [CREATE TABLE MS
      ISDN_BATCH_BATCH_MSISDN_BATCH (Msisdn VARCHAR(250) BINARY NOT NULL, Batch VARCHAR(250) BINARY NOT NULL, CONSTRAINT PK_MSISDN_BATCH_BATCH_MSISDN_BATCH PRIMARY KEY (Msisdn, Batch))])
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:232)


      Anyway, I have copy&paste the above sql sentence for creating the table, and executed directly at mysql, and the table is created with success.

      I am using jdbc driver: com.mysql.jdbc.Driver
      from version: mysql-connector-java-3.1.1-alpha-bin.jar

      Any idea, any help ?

      Thanks

      Victor