1 Reply Latest reply on Jun 16, 2005 1:12 PM by Scott Stark

    JBoss and DB2 error

    Sam Eastburn Newbie

      Hi guys,

      I get an error when I attempt to retrieve information from a table on DB2. As far as I am aware this is because my container managed EJB is trying to retrieve a VARCHAR type using the getByte method of the Java resultSet instead of the getString method.... How could I persuade it to use the latter? Any help would be greatly appreciated

      Regards

      Sam

      p.s error listing below....

      16:50:43,780 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String com.test.getAccountId(), causedBy:
      com.ibm.db2.jcc.b.xd: Invalid data conversion: Wrong result column type for requested conversion.
      at com.ibm.db2.jcc.b.r.N(r.java:1263)
      at com.ibm.db2.jcc.b.rc.getBytes(rc.java:902)
      at org.jboss.resource.adapter.jdbc.WrappedResultSet.getBytes(WrappedResultSet.java:233)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader$5.readResult(JDBCResultSetReader.java:130)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader$AbstractResultSetReader.get(JDBCResultSetReader.java:485)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:413)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadInstanceResults(JDBCAbstractCMPFieldBridge.java:374)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:193)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:74)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:631)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:613)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:391)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:351)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:232)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:111)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:242)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335).........