1 Reply Latest reply on Mar 3, 2004 8:31 AM by ibruell

    Workbook Exercise 7.1 and iSeries/AS400 datasource

    rupshall

      Does anybody have experience with CMP entity relationships and mapping them to AS400 datasources?

      I am working my way through the book and I have all examples to this point(chapter 7) working so I am sure datasource is configured and working. The one-to-one unidirectional and bidirectional examples worked perfectly, the third example is one-many unidirectional and this is where the problem starts.

      Can anybody offer up what the jbosscmp-jdbc.xml file might need to look like for this example? All the EJBs delop without error but when I run client_71c I get an error that produces the following server log:

      2004-02-24 14:24:47,167 INFO [STDOUT] ejbCreate
      2004-02-24 14:24:47,250 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method:
      public abstract com.titan.phone.PhoneLocal com.titan.phone.PhoneHomeLocal.create(java.lang.String,byte) throws javax.ejb.CreateException, causedBy:
      java.sql.SQLException: Data type mismatch.
      at com.ibm.as400.access.JDError.throwSQLException(JDError.java:382)
      at com.ibm.as400.access.SQLLongVarcharForBitData.set(SQLLongVarcharForBitData.java:217)
      at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2817)
      at com.ibm.as400.access.AS400JDBCPreparedStatement.setObject(AS400JDBCPreparedStatement.java:2339)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:623)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:1278)