4 Replies Latest reply on Sep 11, 2013 8:00 AM by vandiesel Branched to a new discussion.

    Is there any document explaining which jar is used for which purpose in jboss as 7.1.1 final "modules" directory.

    vandiesel

      Hi all,

       

      I got the following error while making use of EJB 2.1 stateful session bean in Jboss AS 7.1.1,

       

      java.lang.IllegalArgumentException: Can not set final org.jboss.as.naming.ManagedReference field org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance to org.jboss.as.naming.ValueManagedReferenceFactory$ValueManagedReference.

       

      Using Java-Decompiler, I saw the following code in both the jar files,

       

      1. jboss-as-naming-7.1.1.Final.jar

       

      ValueManagedReferenceFactory.java

       

        public ManagedReference getReference()

        {

          return new ValueManagedReference(this.value.getValue(), null);

        }

        public static class ValueManagedReference implements ManagedReference, Serializable {

          private static final long serialVersionUID = 1L;

          private volatile Object instance;

       

          private ValueManagedReference(Object instance) {

            this.instance = instance;

          }

       

       

       

      2. jboss-as-ejb3-7.1.1.Final.jar

       

      SerializedStatefulSessionComponent.java

       

      public SerializedStatefulSessionComponent(ManagedReference instance, SessionID sessionID, String serviceName, Map<Object, Object> serializableInterceptors)

        {

          this.instance = instance;

          this.sessionID = sessionID;

          this.serviceName = serviceName;

          this.serializableInterceptors = serializableInterceptors;

        }

       

       

      I would like to know if it is possible to resolve the error.

       

      Also, is there any document explaining which module folder is for which purpose, i.e explaining the jar file in each module.

       

      I'm beginner in jboss,  so, please respond to the above questions...

       

      Also, let me know if my approach is correct towards resolving the issue..

       

      Thank you,

       

      Diesel

        • 1. Re: Is there any document explaining which jar is used for which purpose in jboss as 7.1.1 final "modules" directory.
          wdfink

          If you use EJB2.1 I would recommend to use 7.2/EAP6.1.0.Alpha as there are several issues fixed in this area.

          • 2. Re: Is there any document explaining which jar is used for which purpose in jboss as 7.1.1 final "modules" directory.
            vandiesel

            Hey Fink,

             

            Thank u. I've been working on 7.1 for almost a month to fix issues..

             

            I'll get back to u, if I get into any new issues.

             

            Thanks again,

            Diesel

            • 3. Re: Is there any document explaining which jar is used for which purpose in jboss as 7.1.1 final "modules" directory.
              sfcoy

              We can't see much of your stack trace, but I don't think 7.1.1 supported writable JNDI.

               

              ie. applications are unable to add arbitrary objects into the directory.

              • 4. Re: Is there any document explaining which jar is used for which purpose in jboss as 7.1.1 final "modules" directory.
                vandiesel

                Hey Stephen,

                 

                In case, you might want to take a look at the full-stacktrace:

                 

                 

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2) java.lang.IllegalArgumentException: Can not set final org.jboss.as.naming.ManagedReference field org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance to org.jboss.as.naming.ValueManagedReferenceFactory$ValueManagedReference

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(UnsafeQualifiedObjectFieldAccessorImpl.java:83)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at java.lang.reflect.Field.set(Field.java:741)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.storeFields(SerializingCloner.java:368)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:313)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                 

                17:25:25,690 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:231)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.cloneFields(SerializingCloner.java:348)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:309)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:286)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.cloneFields(SerializingCloner.java:348)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:309)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.cloneFields(SerializingCloner.java:348)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:309)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:225)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at com.sun.proxy.$Proxy14.getStateMachine(Unknown Source)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at com.mysedan.application.limonet.control.web.ModelManager.getEJBController(ModelManager.java:1623)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at com.mysedan.application.limonet.control.web.ModelManager.<init>(ModelManager.java:287)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at com.mysedan.application.limonet.control.web.MainServlet.doProcess(MainServlet.java:804)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at com.mysedan.application.limonet.control.web.MainServlet.doGet(MainServlet.java:52)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                 

                17:25:25,706 ERROR [stderr] (http-localhost-127.0.0.1-80-2)     at java.lang.Thread.run(Thread.java:724).

                 

                Just FYI, I am making use of EJB 2.1

                 

                As most of the community users suggested, I will upgrade to EJB 3.1. and make use of JPA 2

                 

                Thanks again,

                 

                Diesel