1 Reply Latest reply on Jan 30, 2009 3:19 PM by venukb

    Using JNDI data source to write objects

      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?:

      Configuration:
      ----------------
      Jboss 4.2.3 GA
      Mysql 5.0.46 enterprise
      Mysql connector : 5.1.7



      thanks in advance :)
      Venu