2 Replies Latest reply on Apr 10, 2003 6:47 PM by Miklos Tverdota

    Mysql/Jdbc

    Miklos Tverdota Newbie

      Hallo,

      I try to start the template application on Win2K.
      (jboss-3.0.6_tomcat-4.1.18, mysql-4.0.12, mm.mysql-2.0.14-bin.jar)

      The standardjbosscmp-jdbc.xml looks like:


      java:/DefaultDS
      <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>
      <select-for-update>true</select-for-update>
      <pk-constraint>false</pk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <row-locking>true</row-locking>

      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>


      The connect is Ok but the "create table" don't work:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:jndiName=ejb/test/TestEntity,service=EJB
      state: FAILED
      I Depend On:

      Depends On Me: org.jboss.deployment.DeploymentException:
      Error while creating table;
      - nested throwable: (java.sql.SQLException: Unexpected token: BINARY in statement

      [CREATE TABLE TESTENTITY (Id INTEGER NOT NULL, First_Name VARCHAR(250) BINARY,
      Last_Name VARCHAR(250) BINARY, Password VARCHAR(250) BINARY,
      Email VARCHAR(250) BINARY, Address VARCHAR(250) BINARY, City VARCHAR(250) BINARY,
      ZIP VARCHAR(250) BINARY, State VARCHAR(250) BINARY, Country VARCHAR(250) BINARY,
      Creation_Date DATETIME, Modification_Date DATETIME)])]

      I tried the create statement above in MySql, the create statement is Perfekt!

        • 1. Re: Mysql/Jdbc
          Jochen Cordes Novice

          Hi !

          Maybe you should use a newer SQL driver (as mm.mysql will be deprecated). Get one named Connector/J from the mysql.com site (3.0.7 being the most recent).

          Hope it helps,

          Jochen.

          • 2. Re: Mysql/Jdbc
            Miklos Tverdota Newbie

            Hi,

            I used the older version of JBOSS and driver to avoid problems with the examples I have.
            They was developed in a similar environment. I hoped it will be more simple.

            I tried the new driver of MySQL (mysql-connector-java-3.0.6-stable) with jboss-3.0.6_tomcat-4.1.18 I got the same problem. There are no other error message in the log.

            I installed the new versions:
            (Win2K, jboss-3.2.0RC4_tomcat-4.1.18, mysql-connector-java-3.0.6-stable, mysql-4.0.12)
            with exact the same configuration and it works.