1 2 Previous Next 16 Replies Latest reply on Oct 16, 2012 8:06 AM by m f

    javax.jms.JMSException: Failed to serialize object

    frh10 ff Newbie

      Hi !

            I deploy a MDB in jboss5.1.0.GA,i create a ObjectMessage instance and set an object(which has implements Serializable) with setObject() method.But the setObject() method throw a error:javax.jms.JMSException: Failed to serialize object,here is the detail code.


      ObjectMessage msg=session.createObjectMessage();

      DataContainer dc=new DataContainer();


      msg.setObject(dc);   ( throw error )


      and here is the DataContainer's code.


      public class DataContainer implements Serializable {

      private Connection conn;
      public Connection getConn() {
        return conn;
      public void setConn(Connection conn) {
        this.conn = conn;


      How can i work out this problem?Thanks!

        1 2 Previous Next