12 Replies Latest reply on May 31, 2012 7:01 AM by jaikiran pai

    [Jboss 7.1] ClassNotFoundException for local interface

    kkkppp Newbie

      Trying to port from Jboss 4.2.2 to AS 7.1, found interesting problem.

       

      Code like this doesn't work (see trace below):

       

      final SWGroupsLocalHome home = homesGetter.getLocalHome(SWGroupsLocalHome.class);

      this.group = home.findByPrimaryKey(((SWUsersPK) ctx.getPrimaryKey()).groupsPK);

       

      but code like this works fine. Both local and remote interfaces are in same module and dependancy to it set, so it's not missibg library issue.

       

      final SWGroupsHome home = homesGetter.getHome(SWGroupsHome.class);

      this.group = home.findByPrimaryKey(((SWUsersPK) ctx.getPrimaryKey()).groupsPK);

       

      This is exception for local interface:

       

      Caused by: java.lang.RuntimeException: ClassNotFoundException marshaling EJB parameters

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:229) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

          at $Proxy83.findByPrimaryKey(Unknown Source)    at com.supportwizard.swusers.SWUsersBean.ejbLoad(SWUsersBean.java:196)

      ...

      Caused by: java.lang.ClassNotFoundException: com.supportwizard.swgroups.SWGroupsLocal$$$view1434 from [Module "com.supportwizard:main" from local module loader @58f39b3a (roots: E:\jboss7\modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_31]

          at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_31]

          at org.jboss.marshalling.cloner.ClassLoaderClassCloner.clone(ClassLoaderClassCloner.java:46)

          at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:158)

          at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

          at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:187)

          at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:225) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          ... 155 more

        • 1. Re: [Jboss 7.1] ClassNotFoundException for local interface
          Stephen Coy Master

          Do you by any chance have copies of the interface classes packaged in both a "client" jar as well as the "EJB" jar?

           

          Normally, I package all remote interfaces in a separate jar and include it in the EJB jar classpath, but leave all local interfaces in the EJB jar.

          • 2. Re: [Jboss 7.1] ClassNotFoundException for local interface
            kkkppp Newbie

            Thanks for quick response, I checked twice, there were no copies of local interface anywhere, the only location was module with "global" scope (where all remote and local interfaces were stored).

             

            I tried to move local interfaces into EJB jar, now error is different:

             

            Caused by: java.lang.RuntimeException: IOException marshaling EJB parameters

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:227) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                at $Proxy83.findByPrimaryKey(Unknown Source)    at com.supportwizard.swusers.SWUsersBean.ejbLoad(SWUsersBean.java:198)

            ...

            Caused by: java.io.NotSerializableException: org.jboss.as.ee.component.ProxyInvocationHandler

                at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:256)

                at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                at org.jboss.marshalling.cloner.SerializingCloner.cloneFields(SerializingCloner.java:348)

                at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:309)

                at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:225) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

            • 3. Re: [Jboss 7.1] ClassNotFoundException for local interface
              jaikiran pai Master

              What exactly does the bean code look like?

              • 4. Re: [Jboss 7.1] ClassNotFoundException for local interface
                kkkppp Newbie

                It does ejbFindByPrimaryKey on another bean in same .jar

                • 5. Re: [Jboss 7.1] ClassNotFoundException for local interface
                  Stephen Coy Master

                  What is the declaration of SWGroupsLocalHome?

                   

                  It looks like it's trying to make a remote call. There should be no serialisation for local EJB calls.

                  • 6. Re: [Jboss 7.1] ClassNotFoundException for local interface
                    kkkppp Newbie

                    public interface SWGroupsLocalHome extends javax.ejb.EJBLocalHome {

                    • 7. Re: [Jboss 7.1] ClassNotFoundException for local interface
                      jaikiran pai Master

                      Could you please post the bean code including the fields in it and the relevant method (you can rename the classes/methods if those can't be publicly shared)? It's really difficult to guess what's going on without having a look at the relevant code.

                      • 8. Re: [Jboss 7.1] ClassNotFoundException for local interface
                        kkkppp Newbie

                        // problem class

                        public class SWUsersBean extends IntegrityAwareEntityBase implements EntityBean {

                          private static final long serialVersionUID = -3515723369114140467L;

                          private SWGroupsLocal              group;

                         

                          private static final Logger log = Logger.getLogger(SWUsers.class);

                          private static final Logger log568 = Logger.getLogger("Bug568Catcher");

                         

                          private EntityContext         ctx;

                          private SWLDAPUsers           ldapUser;

                          private HomesGetter           homesGetter;

                          private SWUserAccess access;

                          private boolean ldapUserFlag;

                          private transient String name;

                          private transient String DN;

                          private SWTeamsInterface primaryTeam;

                        ...

                          public void ejbLoad() {

                            log.debug("ejbload entered");

                         

                            try {

                              setHomesGetter();

                         

                              final SWGroupsLocalHome home = homesGetter.getLocalHome(SWGroupsLocalHome.class);

                              this.group = home.findByPrimaryKey(((SWUsersPK) ctx.getPrimaryKey()).groupsPK);   // <<<<< we do fail here

                        ...

                         

                        // PK class, just for case

                        public class SWUsersPK implements Serializable {

                        • 9. Re: [Jboss 7.1] ClassNotFoundException for local interface
                          Halli Balli Newbie

                          Does anyone have a solution for this yet?

                           

                          I seem to have the same problem. I have a project that has to be migrated from JBoss 4 to JBoss 7 and  I have a EJBLocalHome that has a method

                           

                          Collection findByUsername(String username) throws FinderException;

                           

                          and I get the following error:

                           

                          Caused by: java.lang.RuntimeException: ClassNotFoundException marshaling EJB parameters

                              at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:229) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                           

                           

                          The SQL statement ist called (I checked with profiler).

                          • 10. Re: [Jboss 7.1] ClassNotFoundException for local interface
                            jaikiran pai Master

                            Please post the entire exception stacktrace.

                            • 11. Re: [Jboss 7.1] ClassNotFoundException for local interface
                              Dieder Timmers Newbie

                              The same problem over here, I'm trying to port an application from JBoss 4 to JBoss 7 and i get this stacktrace:

                              21:54:39,226 ERROR [org.jboss.ejb3.invocation] (ajp-web2.vipe.nl-127.0.0.1-8209-16) JBAS014134: EJB Invocation failed on component ReservationService for method public abstract nl.vipe.booking.ejb.reservation.data.ReservationVO nl.vipe.booking.ejb.reservation.services.ReservationService.updateReservation(nl.vipe.booking.ejb.reservation.data.ReservationVO) throws java.rmi.RemoteException,nl.vipe.booking.exception.BookingApplicationException: javax.ejb.EJBException: java.lang.RuntimeException: IOException marshaling EJB parameters

                                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:65) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at $Proxy21.updateReservation(Unknown Source)    at nl.vipe.booking.web.reservation.review_invoice.ReviewInvoiceControllerImpl.create(ReviewInvoiceControllerImpl.java:150)

                                  at nl.vipe.booking.web.reservation.review_invoice.ReviewInvoice._createNewReservation(ReviewInvoice.java:124)

                                  at nl.vipe.booking.web.reservation.review_invoice.ReviewInvoice.__checkPreConditions(ReviewInvoice.java:168)

                                  at nl.vipe.booking.web.reservation.review_invoice.ReviewInvoice._checkPreconditions(ReviewInvoice.java:105)

                                  at nl.vipe.booking.web.reservation.review_invoice.ReviewInvoice.execute(ReviewInvoice.java:33)

                                  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) [struts-1.2.7.jar:1.2.7]

                                  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) [struts-1.2.7.jar:1.2.7]

                                  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) [struts-1.2.7.jar:1.2.7]

                                  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.7.jar:1.2.7]

                                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                  at nl.vipe.booking.web.user.apply_user_preferences.ApplyPreferences.doFilter(ApplyPreferences.java:43)

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                  at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) [displaytag-1.0.jar:1.0]

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                  at nl.vipe.booking.common.util.CharsetFilter.doFilter(CharsetFilter.java:48) [booking-common-1.1-SNAPSHOT.jar:]

                                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)

                                  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                                  at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505)

                                  at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:445)

                                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

                              Caused by: java.lang.RuntimeException: IOException marshaling EJB parameters

                                  at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:227) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:216) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:188) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) [jboss-ejb-client-1.0.5.Final.jar:1.0.5.Final]

                                  at $Proxy23.getInitialStateForStateModel(Unknown Source)    at nl.vipe.booking.ejb.reservation.services.ReservationServiceBeanImpl.updateReservation(ReservationServiceBeanImpl.java:2056) [booking-ejb.jar:]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]

                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]

                                  at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]

                                  at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  ... 63 more

                              Caused by: java.io.NotSerializableException: org.jboss.as.ee.component.ProxyInvocationHandler

                                  at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:256)

                                  at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                                  at org.jboss.marshalling.cloner.SerializingCloner.cloneFields(SerializingCloner.java:348)

                                  at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:309)

                                  at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:254)

                                  at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:135)

                                  at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:225) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

                                  ... 94 more

                               

                              Now I've done some debugging:

                              The first session bean 'ReservationService' calls a method 'getInitialStateForStateModel' of a second session bean 'StateModelService' the method call succeeds however the returning of the retreived State triggers this exception. It

                              it turns out that a proxy view object (class nl.vipe.workflow.statemodel.entities.State$$$view129) is being serialized. (This is probably needed in the internals of JBoss) . However one of the fields of this proxy view is 'org.jboss.as.ee.component.ProxyInvocationHandler' which is not seriaizable. Should I change some configuration to stop JBoss from using the remote method invocation,or is this a bug and should the field that holds 'org.jboss.as.ee.component.ProxyInvocationHandler' not be serialized?

                               

                              I'll post the relevant piece's of code:

                               

                              public class ReservationServiceBeanImpl extends ReservationServiceBean {

                               

                              public ReservationVO updateReservation(ReservationVO reservationVO) throws BookingApplicationException {

                                      LOG.debug("updateReservation...");

                               

                                      try {

                               

                                          // Retrieve reservation for the provided ID

                                          ReservationLocalHome _reservationLocalHome = getReservationLocalHome();

                                          Reservation _reservation = _reservationLocalHome.findByPrimaryKey(reservationVO.getReservationID());

                                          _reservation.update(reservationVO);

                               

                                          StateModelService _stateModelService = StateModelServiceUtil.getHome().create();

                                          StateModel _stateModel = StateModelUtil.getLocalHome().findByPrimaryKey(

                                                  ReservationCalculations.determineStateModel(_reservation.getVO()));

                                          State _initialState = _stateModelService.getInitialStateForStateModel(_stateModel.getStateModelID());

                                          _reservation.updateState(_initialState);

                               

                                          return _reservation.getVO();

                                      } catch (NamingException _exc) {

                                          handleException(_exc, reservationVO.getReservationID(), reservationVO);

                                          return null;

                                      } catch (FinderException _exc) {

                                          handleException(_exc, reservationVO.getReservationID(), reservationVO);

                                          return null;

                                      } catch (CreateException _exc) {

                                          handleException(_exc, reservationVO.getReservationID(), reservationVO);

                                          return null;

                                      } catch (RemoteException e) {

                                          handleException(e, reservationVO.getReservationID(), reservationVO);

                                          return null;

                                      }

                                  }

                               

                              public class StateModelServiceBeanImpl extends StateModelServiceBean {

                                private static final Logger LOG = Logger.getLogger(StateModelServiceBeanImpl.class);

                              public nl.vipe.workflow.statemodel.entities.State getInitialStateForStateModel(java.lang.String stateModelID)

                                    throws BookingApplicationException {

                                  if (LOG.isDebugEnabled())

                                    LOG.debug("getInitialStateForStateModel...");

                               

                                  try {

                                    StateLocalHome _stateLocalHome = StateUtil.getLocalHome();

                                    State _initialState = _stateLocalHome.findInitialStateForStateModel(stateModelID);

                                    return _initialState;

                                  } catch (NamingException _ne) {

                                    throw new BookingApplicationException(_ne);

                                  } catch (FinderException _fe) {

                                    throw new BookingApplicationException(_fe);

                                  }

                                }

                              }

                               

                              I can provide more feedback or information if this is needed to solve this stacktrace

                              • 12. Re: [Jboss 7.1] ClassNotFoundException for local interface
                                jaikiran pai Master

                                Please create a JIRA for this. I haven't been able to look at the details of this yet. In the JIRA please attach a reproducible application if possible.