0 Replies Latest reply on Dec 30, 2002 10:08 AM by eelgueta

    Error creating table (mySQL)

    eelgueta

      Hi All,

      I have a CMP-EJB, with the following jbosscmp-jdbc.xml:

      <jbosscmp-jdbc>

      java:/iscpdb
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <pk-constraint>true</pk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>

      <enterprise-beans>

      <ejb-name>RoleAccessTable</ejb-name>
      <table-name>roleaccesstable</table-name>
      <cmp-field><field-name>role</field-name></cmp-field>
      <cmp-field><field-name>method</field-name></cmp-field>



      java:/iscpdb is a mySQL datasource (only the names are modified from the docs example).

      When I deploy, I get this error:
      Depends On Me: org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: General error: Can't create table '.\iscpdb\roleaccesstable.frm' (errno: 140))]

      Why the table name is ".\iscp.." when I specified only "roleaccesstable"?

      TIA,

      Ed.