5 Replies Latest reply on Aug 8, 2006 8:48 AM by tejas_pajai

    java.sql.SQLException: Table not found in statement

    moisesjboss

      I hava a XA Oracle datasource set up in JBoss 4.0.4, which is using JBossts 4.2 (I followed the installation instructions that comes with JBoss TX).
      I have a simple session bean that updates a table within a user transaction:

      DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/XAOracleDS");
      con = ds.getConnection();
      UserTransaction ut = sessionContext.getUserTransaction();
      ut.begin();
      stmt.executeUpdate(sql);
      ut.rollback();

      when the code runs I get the exception below. JBoss uses HSQLDB classes of the oracle classes!
      Am I missing something here?

      10:17:52,466 ERROR [STDERR] java.sql.SQLException: Table not found in statement [update EMP]
      10:17:52,466 ERROR [STDERR] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
      10:17:52,466 ERROR [STDERR] at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
      10:17:52,466 ERROR [STDERR] at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
      10:17:52,466 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:184)
      10:17:52,466 ERROR [STDERR] at com.mqv.sample.TxTestSessionBean.txUpdate(TxTestSessionBean.java:63)
      10:17:52,466 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      10:17:52,466 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      10:17:52,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      10:17:52,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
      10:17:52,466 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
      10:17:52,466 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)