2 Replies Latest reply on Jul 14, 2007 7:34 AM by kaviarasu

    Cant able to use stateful bean in project

    kaviarasu

      Hi i cant able to use stateful bean in any of my project i had pated the coding i had used .it says the component cannot registered ,can any one tell suggestion

      @Stateful
      @Scope(SESSION)
      @Name("usermessage2")
      public class UserComments implements Serializable, UserDisplay1 {
       private static final long serialVersionUID = 1L;
       @DataModel
       private List userList2;
      
       @DataModelSelection
       @Out(required=false)
      private TblComments1 message;
      
       @PersistenceContext
       private EntityManager em;
       long productid=1001;
       @Factory("userList2")


        • 1. Re: Cant able to use stateful bean in project
          ellenzhao

          could you please paste some stack trace?

          • 2. Re: Cant able to use stateful bean in project
            kaviarasu

            Hi i missed the annotations @Destroy @Remove not while adding the lines


            @DataModelSelection
            @Out(required=false)
            private TblComments1 message;

            im getting the error like

            java.lang.UnsupportedOperationException: Stateless psuedo-scope does not have a Context object






            17:00:10,625 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            17:00:10,625 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21])
            17:00:10,625 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            17:00:10,625 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21])
            17:00:10,640 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            17:00:10,640 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21])
            17:00:10,640 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            17:00:10,640 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=sys/21, BranchQual=, localId=21])



            thank u for ur reply