2 Replies Latest reply on Sep 2, 2010 12:47 PM by tosehee75

    JDBC Loader doesn't create table?

    tosehee75

      Hello.

       

      Trying to configure the jboss cache.xml with JDBC loader and table.create=true, but it doesn't seem to be doing it.

       

       

      Here is the snippet of config xml.

       

       

       

      <loader async="true" fetchPersistentState="true" ignoreModifications="true" purgeOnStartup="true">
      <properties>
      cache.jdbc.table.name=JBOSSCACHE
      cache.jdbc.table.create=true
      cache.jdbc.table.drop=true
      cache.jdbc.datasource=datasource_name
      </properties>
      <singletonStore>
      <properties> pushStateWhenCoordinator=true pushStateWhenCoordinatorTimeout=20000</properties>
      </singletonStore>
      </loader>

       

       

       

      and I get this exception..

       

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'staging.JBOSSCACHE' doesn't exist

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

      at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

      at com.mysql.jdbc.Util.getInstance(Util.java:381)

      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)

      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)

      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)

      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)

      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)

      My question is..
      Does cache.jdbc.table.create=true get ignored if using datasource for jdbc loader?
      If so, is there a custom sql that I can run to create these tables manually?
      Thanks in advance.