Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-215

Error mapping java.lang.Object in CMP with Sybase 12.5.3 ASE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.RC6
    • 4.2.RC6
    • System
    • None

      I get this error with CMP in Sybase where an entity bean has a java.lang.Object field. I see that an Object is mapped to an IMAGE datatype in Sybase.

      The manuals for Sybase 12.5.3 says that the system table Sysxtypes contains one row for each extended JAVA-SQL datatype.

      I see that Sysxtypes is something new in Sybase Adaptive Server Version 12.

      http://manuals.sybase.com/onlinebooks/group-asarc/asg1200e/whatsup/@Generic__BookTextView/1840
      http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.tables/html/tables/tables73.htm

      2007-06-08 09:46:29,671 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ejb_ee_bb_entity_cmp20_complexpktest_TestBean] Executing SQL: SELECT COUNT FROM COMPLEXPK_TABLE1 WHERE BRANDNAME=? AND ID=?
      2007-06-08 09:46:29,750 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#brandName param: i=1, type=VARCHAR, value=Hazelnut
      2007-06-08 09:46:29,750 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#id param: i=2, type=INTEGER, value=1
      2007-06-08 09:46:29,812 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ejb_ee_bb_entity_cmp20_complexpktest_TestBean] Executing SQL: INSERT INTO COMPLEXPK_TABLE1 (BRANDNAME, ID, PRODUCT, PRICE) VALUES (?, ?, ?, ?)
      2007-06-08 09:46:29,812 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#brandName param: i=1, type=VARCHAR, value=Hazelnut
      2007-06-08 09:46:29,812 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#id param: i=2, type=INTEGER, value=1
      2007-06-08 09:46:29,812 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#product param: i=3, type=JAVA_OBJECT, value=com.sun.ts.tests.ejb.ee.bb.entity.cmp20.complexpktest.Product@190c5c0
      2007-06-08 09:46:29,812 TRACE org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ejb_ee_bb_entity_cmp20_complexpktest_TestBean#price param: i=4, type=DOUBLE, value=1.0
      2007-06-08 09:46:29,890 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ejb_ee_bb_entity_cmp20_complexpktest_TestBean] Could not create entity
      com.sybase.jdbc2.jdbc.SybSQLException: Class com.sun.ts.tests.ejb.ee.bb.entity.cmp20.complexpktest.Product not found. Check and make sure that the class has been installed, and an entry exists in Sysxtypes.
      at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3178)
      at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2481)
      at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
      at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)
      at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)
      at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1717)
      at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1700)
      at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:115)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCAbstractCreateCommand.java:365)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:321)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:151)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)

              olubyans@redhat.com Alexey Loubyansky
              rrajasek@redhat.com Rajesh Rajasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: