1 Reply Latest reply on Jun 28, 2010 12:37 AM by anithakothandapani

    JBoss Cache  3.2.2.GA - table or view does not exist error

    anithakothandapani

      Hi all,

       

      My application uses Jboss-cache and was working fine with jbosscache-core.jar (3.0.2.GA)

       

      I migrated it to JBoss EAP 5.0 which has jbosscache-core.jar (3.2.2 GA ) version.

       

      While starting the cache, I get the following error:

      java.lang.IllegalStateException: Failed to insert node: ORA-00942: table or view does not exist
      
          at org.jboss.cache.loader.AdjListJDBCCacheLoader.insertNode(AdjListJDBCCacheLoader.java:562)
      

       

      The dummy tables (<table_name>_D)  are not created.

      I am using org.jboss.cache.loader.JDBCCacheLoader class and have set the cache.jdbc.table.create=true.

       

      I also found that AdjListJDBCCacheLoader.start() & createDummyTableIfNeeded() methods are not being called from the trace logs.

       

      Is there any new configuration needed for 3.2.2.GA ?  Please help.

       

      Thanks,

      Anitha

       


        • 1. Re: JBoss Cache  3.2.2.GA - table or view does not exist error
          anithakothandapani

          Huray . After going through the source code of Jboss cache , I got to know thatthe problem is with my configuration in cache-config.xml.

           

          Since we have multiple schema in our db, the table name should be prefixed with the schema name before the table name like this below

           cache.jdbc.table.name=<SCHEMA_NAME>.<TABLE_NAME>
          

           

          Since the dummy table got created in one such schema in the db, the AdjListJDBCCacheLoader:tableExists method returned true in our case. So after appending the <SCHEMA_NAME> in the cache-config.xml, the dummy table got created in my schema (expected schema).

           

          So if you are multiple schema in the same db , then append the "<SCHEMA_NAME>." before the table name. Since the implementation of databaseMetaData.getTables(catalog, schema, tableName, null); expects the schema name.