3 Replies Latest reply on Dec 7, 2009 5:23 AM by bsgcic

    Serialization Exception on @Destroy. Stateful session bean with nested classes.

    bsgcic Newbie

      I have seen others with similar issues but never resolved. There is also an unresolved Jira on this. (Links below.) Has anyone had similar issues? Is this a bug or user error? Your help would be greately appreciated. Please let me know if I should post more details of the code and/or error. Thank you in advance.


      @Stateful
      @Name("sessionStateful")
      @Scope(ScopeType.SESSION)
      @AutoCreate
      @Startup(depends="com.oneaction.util.SessionGeneral")
      public class SessionStatefulAction implements SessionStateful
      {
           public class ActivityStatusAction implements ActivityStatus
           {
                public class IdAction implements Id
                {
                     //public Long getACTIVE() { return (long)1; }
                     private Long ACTIVE = (long)1;
                     public Long getACTIVE(){return ACTIVE;}
                     public void setACTIVE(Long active){ACTIVE = active;}
                     
                     //@Destroy
                     //@Remove
                     //public void destroy() {}
                     
                } //public class IdAction implements Id
                private Id id = new IdAction();
                public Id getId(){return id;}
                public void setId(Id id){this.id = id;}
                
           } //public class ActivityStatusAction implements ActivityStatus
           private ActivityStatus activityStatus = new ActivityStatusAction();
           public void setActivityStatus(ActivityStatus activityStatus){this.activityStatus = activityStatus;}
           public ActivityStatus getActivityStatus(){return activityStatus;}
           @Destroy
           @Remove
           public void destroy() {}
           
           
      } //public class SessionStatefulAction implements SessionStateful
      
      
      @Local
      public interface SessionStateful
      {
           
           @Local
           public interface ActivityStatus
           {
                @Local
                public interface Id
                {
                     public Long getACTIVE();
                     public void setACTIVE(Long active);
                     
                     //public void destroy();
                     
                } //public interface Id
                public Id getId();
                public void setId(Id id);
           } //public interface ActivityStatus
           public ActivityStatus getActivityStatus();
           public void setActivityStatus(ActivityStatus activityStatus);
           
           public void destroy();
           
      } //public interface SessionStateful
      
      



      The error:


      14:46:40,000 WARN  [Component] Exception calling component @Destroy method: sessionStateful
      javax.ejb.EJBException: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of com.oneaction.util.SessionStatefulAction$ActivityStatusAction - com.oneaction.util.SessionStatefulAction$ActivityStatusAction
      
      



      Here are related posts on this:


      Exception on @Destroy method causes jboss server to stall


      FullTextEntityManagerImpl


      Serialization error on FullTextEntityManagerImpl


      Google Search on it


      Thank you in advance


      Jeff