1 Reply Latest reply on Feb 28, 2003 8:35 AM by darranl

    jbossCMP & MySQL problem?

    rshoon

      I have to say the documentation is very good. However I am trying to switch to use MySQL as a database. All the EJBs deploy execpt one....

      I believe this create table syntax should be for any database? is that not correct? if not why have it?
      and I do not see any of the tables created when i log into mysql, all EJBs deploy except LocationBean.

      Can someone give me a few hints as to what i am doing wrong.

      thanks,
      rsh

      below is the error



      20:35:21,751 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=crimeportal/Loca
      tion,service=EJB
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.
      SQLException: Syntax error or access violation: You have an error in your SQL syntax near 'desc VARC
      HAR(250) BINARY NOT NULL, the_boss INTEGER, CONSTRAINT pk_organization ' at line 1)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:175)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)

        • 1. Re: jbossCMP & MySQL problem?
          darranl

          I am assuming that your problem is with the examples supplied with the JBossCMP Manual.

          The error looks as if a column is being created with the name 'desc', this is a reserved word that should not be used for a column name.

          I have had a look at the 'jbosscmp-jdbc.xml' file and for the OrganisationEJB the field 'description' is mapped to the column 'desc'. Try changing the mapping to something different.