Bugs item #573192, was opened at 2002-06-24 18:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=573192&group_id=22866
Category: JBossCMP Group: v3.0 Rabbit Hole Status: Open Resolution: Accepted Priority: 5 Submitted By: Christian Riege (lqd) Assigned to: Dain Sundstrom (dsundstrom) Summary: CMP mapping broken Initial Comment: Dain, something broke between JDBCUtil.java 1.9 and 1.9.2.1 in relation to persisting java.math.BigDecimal (and quite likely other types). I have a CMP bean with a mapping of a java.math.BigDecimal <-> NUMERIC in the DB ( PostgreSQL 7.1 w/ PostgreSQL type mapping). With JBoss 3.0.1RC1 from 06-13 my Bean successfully persisted the value in the DB and read it back correctly: --< snip >-- 2002-06-24 16:56:44,789 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.actualWeight] Get result: index=3, javaType=java.math.BigDecimal, Object, value=1234.567 --< /snip >-- after upgrading to newest 3.0.1 CVS version I get an exception: --< snip >--2002-06-24 17:33:20,154 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy: java.sql.SQLException: Unable to load to deserialize result: java.io.StreamCorruptedException: InputStream does not contain a serialized object »···at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.convertByteArrayToObject(JDBCUtil.java:603) »···at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.getResult(JDBCUtil.java:310) (more follows but is not relevant IMHO) --< /snip >-- downgrading JDBCUtil 1.9.2.1 to JDBCUtil 1.9 solves the problem (i.e. the BigDecimal is stored / restored correctly). If you need more info pls. drop me a note. Sorry for the high priority level but I think this is urgent. ---------------------------------------------------------------------- >Comment By: Christian Riege (lqd) Date: 2002-06-25 18:29 Message: Logged In: YES user_id=176671 I did that, I already added two log.trace statements to JDBCUtil.java to show more of the error (patch is attached); it seems that we're falling into an InvocationTargetException, here is the log: 2002-06-25 18:22:06,349 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.volumeUnit] Get result: index=1, javaType=java.lang.String, Simple, value= 2002-06-25 18:22:06,350 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.consigneeReference] Got method public abstract java.lang.String java.sql.ResultSet.getString(int) throws java.sql.SQLException for java.lang.String 2002-06-25 18:22:06,350 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.consigneeReference] Get result: index=2, javaType=java.lang.String, Simple, value=Consignee Reference 2002-06-25 18:22:06,350 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.actualWeight] Got method public abstract java.math.BigDecimal java.sql.ResultSet.getBigDecimal(int) throws java.sql.SQLException for java.math.BigDecimal 2002-06-25 18:22:06,563 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Shipment.actualWeight] Caught InvocationTargetException: null 2002-06-25 18:22:06,570 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy: java.sql.SQLException: Unable to load to deserialize result: java.io.StreamCorruptedException: InputStream does not contain a serialized object ---------------------------------------------------------------------- Comment By: Dain Sundstrom (dsundstrom) Date: 2002-06-25 01:48 Message: Logged In: YES user_id=251431 I rewrote most of the JDBCUtil class. Can you increace the log level to trace for the org.jboss.ejb.plugins.cmp category and post the log lines that immedately preceed the exception? You can find directions in the log4j.xml file in the server/default/conf directory. I am specifically looking for the results of this code: log.trace("Get result: index=" + index + ", javaType=" + destination.getName() + ", Simple, value=" + value); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=573192&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by: Jabber Inc. Don't miss the IM event of the season | Special offer for OSDN members! JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development