I've configured jboss 4.0.3SP1 to use mysql (5.0.18) and am using netbeans 5.0 
as my IDE.

I'm attempting to use CMP to have jboss manage my entity beans with mysql and 
when I try to create a minimal Entity Bean, when deployed, I receive the 
following error:

19:51:43,593 WARN  [ServiceController] Problem starting service 
jboss.j2ee:jndiName=local/[EMAIL PROTECTED],service=EJB
org.jboss.deployment.DeploymentException: Error while creating table 
userinfobean; - nested throwable: 
(com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your 
SQL syntax; check the manual that corresponds to your MySQL server version for 
the right syntax to use near 'VARCHAR(250) BINARY NOT NULL, CONSTRAINT 
pk_userinfobean PRIMARY KEY (key))' at line 1)


I have created a jbosscmp-jdbc.xml file (Is this necessary in addition to the 
standardjbosscmp-jdbc.xml file if it's using the same datastore?) which looks 
like this:

<jbosscmp-jdbc>

      java:/DefaultDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <alter-table>true</alter-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <read-time-out>300000</read-time-out>
      <row-locking>false</row-locking>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
         on-load
         <page-size>1000</page-size>
         <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>
      <clean-read-ahead-on-load>false</clean-read-ahead-on-load>

      <unknown-pk>
         <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
         <unknown-pk-class>java.lang.String</unknown-pk-class>
         <jdbc-type>VARCHAR</jdbc-type>
         <sql-type>VARCHAR(32)</sql-type>
      </unknown-pk>

      <entity-command name="default"/>
      
<ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler>
      <throw-runtime-exceptions>false</throw-runtime-exceptions>

</jbosscmp-jdbc>

Are there any suggestions as to what would cause the syntax error? It doesn't 
appear I'm using any reserved words or anything.

Thanks!

Anthony

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920200#3920200

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920200


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to