1 Reply Latest reply on Dec 14, 2005 3:02 PM by jlukar

    JDBCCacheLoaderTestCase  and Informix  persistance

    jlukar

      I am running the provided org.jboss.cache.loader.JDBCCacheLoaderTestCase and trying to test this out with Informix database.

      The current test case assumes a mysql database.

      I simply plugged in my informix database settings and tried the test and get the following error:

      java.sql.SQLException: A syntax error has occurred.
       at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:355)
       at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3086)
       at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
       at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2259)
       at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2179)
       at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:721)
       at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java:305)
       at com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java:882)
       at com.informix.jdbc.IfxStatement.executeUpdate(IfxStatement.java:206)
       at org.jboss.cache.loader.JDBCCacheLoader.start(JDBCCacheLoader.java:718)
       at org.jboss.cache.TreeCache.startService(TreeCache.java:1261)
       at org.jboss.cache.loader.CacheLoaderTestsBase.setUp(CacheLoaderTestsBase.java:46)
       at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
      
      



      I don't see any special sql scripts that setup the schema so I am assuming that the cache.startService() takes care of setting up the schema for persistance.

      Can someone tell me what is going on ? I suspect, whatever sql is used to setup the schema is not compatible with Informix syntax.





        • 1. Re: JDBCCacheLoaderTestCase  and Informix  persistance
          jlukar


          I resolved issue, by debugging and tracing through the JDBCCacheLoader code.

          It is the sql syntax that is different for mysql v.s. informix when creating persist table schema in DB.

          mysql syntax is:

          create table jbosscache(fqn varchar(255) not null, node blob, parent varchar(255), constraint jbosscache_pk primary key (fqn))
          



          whereas infomix requires:

          create table jbosscache(fqn varchar(255) not null, node blob, parent varchar(255), primary key (fqn) constraint jbosscache_pk )
          
          


          otherwise syntax error is propogated out of DB. Had to turn on "debug"