4 Replies Latest reply on Feb 14, 2012 9:59 AM by msansm1

    java.io.NotSerializableException

    msansm1

      Hello,

       

      It has been few days that I get this exception, and I still have no idea what's going on :


      java.io.NotSerializableException: com.devoteam.armv4.ejb.model.ProjectDetails

      java.io.ObjectOutputStream.writeObject0(Unknown Source)

      java.io.ObjectOutputStream.writeObject(Unknown Source)

      java.util.ArrayList.writeObject(Unknown Source)

      sun.reflect.GeneratedMethodAccessor645.invoke(Unknown Source)

      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      java.lang.reflect.Method.invoke(Unknown Source)

      java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)

      java.io.ObjectOutputStream.writeSerialData(Unknown Source)

      java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

      java.io.ObjectOutputStream.writeObject0(Unknown Source)

      java.io.ObjectOutputStream.writeObject(Unknown Source)

      org.jboss.aop.joinpoint.InvocationResponse.writeExternal(InvocationResponse.java:100)

      java.io.ObjectOutputStream.writeExternalData(Unknown Source)

      java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

      java.io.ObjectOutputStream.writeObject0(Unknown Source)

      java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

      java.io.ObjectOutputStream.writeSerialData(Unknown Source)

      java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)

      java.io.ObjectOutputStream.writeObject0(Unknown Source)

      java.io.ObjectOutputStream.writeObject(Unknown Source)

      org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:120)

      org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95)

      org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120)

      org.jboss.remoting.transport.socket.ServerThread.versionedWrite(ServerThread.java:1072)

      org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:830)

      org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)

      org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

      org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

       

       

      The class which has the problem is a model for me, inside the EJBs and it serves to tranfer just the needed information to the app.

      The first thing I have done when I get the error was to implement Serializable, but it has no effect. The application was running before the error comes from nowhere, and it still running on other servers.

       

       

       

      ProjectDetails.java

       

      public class ProjectDetails implements Serializable {

          private static final long serialVersionUID = 8686299699916111436L;

         

          private Integer id;

          private String name;

          private String description;

          private Integer nbOutOfDelay;

          private String iconDelay;

          private List<JobsInStatus> jobsCount;

          private String roleName;

         

          public ProjectDetails() {

          }

       

          public ProjectDetails(Integer id, String name, String description,

                  Integer nbOutOfDelay, String iconDelay, List<JobsInStatus> jobsCount,

                  String roleName) {

              this.id = id;

              this.name = name;

              this.description = description;

              this.nbOutOfDelay = nbOutOfDelay;

              this.iconDelay = iconDelay;

              this.jobsCount = jobsCount;

              this.roleName = roleName;

          }

       

      ...

      }

       

       

       

      And the JobsInStatus class :

       

      public class JobsInStatus implements Serializable {

      private static final long serialVersionUID = 1648074367523844962L;

       

      private String status;

      private Integer nbJobs;

      private Integer nbOutOfDelay;

       

      public JobsInStatus() {

      }

       

      public JobsInStatus(String status, Integer nbJobs, Integer nbOutOfDelay) {

        this.status = status;

        this.nbJobs = nbJobs;

        this.nbOutOfDelay = nbOutOfDelay;

      }

       

      ....

      }

       

       

      I don't get why I get the error, and I am running out of hope...

      If anyone has an idea, I take it.

       

      Thanks