[jboss-user] [JNDI/Naming/Network] - Using JNDI data source to write objects

venukb do-not-reply at jboss.com
Fri Jan 30 14:55:31 EST 2009

I have configured a connection pool in JBoss to talk to MySQL DB (using a *-ds.xml in deploy directory)  
The datasource is bound to JNDI and is used by applications running in a different VM

Basic query/update has always been fine :)
Recently I had to store a java object in MySQL DB

I used preparedstatement.readobject and writeobject(). This seems to be throwing JbossLazyUnmarshallingException

I used the same code in a normal Java program (using DriverManager rather than the JNDI to get the SQL connection)
This ran fine (both for reading and writing objects)

How to avoid the Unmarshallingexception? Do I need to use Streams to write and read data? Or is there is a config to disable Lazy Unmarshalling?:

Jboss 4.2.3 GA
Mysql 5.0.46 enterprise
Mysql connector : 5.1.7

thanks in advance :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205989#4205989

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205989

More information about the jboss-user mailing list