I have a simple EJB that has three fields ("ID", a "key" and a "value")
Key is a string, and value is given as being of class
java.io.Serializable, so this class represents a basic key/value pair.
Data appears to be serialized to the database okay (Postgres 7.2.1,
column type BYTEA) but as a byte array. (I'll paste it below so someone
can correct me when they want to)

On deserializing the data, I get ClassCastErrors. The class being
recovered from the DB is "[B" according to the exception being thrown,
and that's just plain wrong. Anyone else seen this or got any ideas? A

deserializedObject.getClass().getName()

also returns "[B". More poking about reveals that this is a byte array.
Is it a quirk of my JDBC driver that this happens, or is this something
to do with JBoss' handling of serialzied objects in EJBs? I can post
code, should people need it.

Currently using Postgres 7.2.1, JDK 1.4 (from Sun), JBoss 3RC2, the
usual suspects :)

Regards,

Simon


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to