1 Reply Latest reply on Jun 20, 2013 11:20 PM by Ron Sigal

    Isolated EJB2 Access from a Client - Jboss 4.3 EAP

    Rodel Talampas Newbie

      Hi..

       

      I have a task to Isolate Class libraries between 2 Enterprise Application A.ear and B.ear.  B EJB requires to Access A's Remote EJB, but it is throwing exception. But calling A's client to call A's ejb does not have a problem.What am I missing? The failure is very very odd because it is saying ClassNotfound for an object in B while B is accessing EJB in A. The class is in B's lib directory. Stacktrace below:

       

      2013-06-18 13:22:51,644 ERROR [com.cassis.reqmgr.jobmgr.ExecuteJob_Bean] executeAsyncJob(): Exception: java.rmi.MarshalException: MarshalException; nested exception is:

          org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed

      2013-06-18 13:22:51,645 ERROR [STDERR] java.lang.Exception: java.rmi.MarshalException: MarshalException; nested exception is:

          org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed

      2013-06-18 13:22:51,645 ERROR [STDERR]     at com.cassis.reqmgr.jobmgr.ExecuteJob_Bean.performIPU(ExecuteJob_Bean.java:209)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at com.cassis.reqmgr.jobmgr.ExecuteJob_Bean.executeAsyncJob(ExecuteJob_Bean.java:95)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)

      2013-06-18 13:22:51,645 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:57)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.timer.TimerTxRegistrationInterceptor.invoke(TimerTxRegistrationInterceptor.java:38)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.ejb3.timer.TimerTxRegistrationInterceptor.invoke(TimerTxRegistrationInterceptor.java:29)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,646 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:94)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:70)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:139)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:217)

      2013-06-18 13:22:51,647 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:187)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at $Proxy586.executeAsyncJob(Unknown Source)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at com.cassis.reqmgr.jobmgr.ExecuteJobInvoker.invokeExecuteAsyncJob(ExecuteJobInvoker.java:74)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at com.cassis.reqmgr.jobmgr.ExecuteJobInvoker.run(ExecuteJobInvoker.java:63)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:662)

      2013-06-18 13:22:51,648 ERROR [STDERR] Caused by: java.rmi.MarshalException: MarshalException; nested exception is:

          org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.ejb.Container.invoke(Container.java:1010)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      2013-06-18 13:22:51,648 ERROR [STDERR]     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.invocation.InvokerInterceptor.invokeLocalMarshalled(InvokerInterceptor.java:295)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:61)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at $Proxy588.execute(Unknown Source)

      2013-06-18 13:22:51,649 ERROR [STDERR]     at com.cassis.reqmgr.jobmgr.ExecuteJob_Bean.performIPU(ExecuteJob_Bean.java:199)

      2013-06-18 13:22:51,649 ERROR [STDERR]     ... 43 more

      2013-06-18 13:22:51,649 ERROR [STDERR] Caused by: org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:513)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.ejb.Container.invoke(Container.java:924)

      2013-06-18 13:22:51,650 ERROR [STDERR]     ... 61 more

      2013-06-18 13:22:51,650 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.cassis.reqmgr.bo.basic.ProgramUnitType

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:534)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:428)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.lang.Class.forName0(Native Method)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.lang.Class.forName(Class.java:247)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at org.jboss.invocation.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:109)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)

      2013-06-18 13:22:51,650 ERROR [STDERR]     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)

      2013-06-18 13:22:51,651 ERROR [STDERR]     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

      2013-06-18 13:22:51,652 ERROR [STDERR]     at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:91)

      2013-06-18 13:22:51,652 ERROR [STDERR]     at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:509)

      2013-06-18 13:22:51,652 ERROR [STDERR]     ... 62 more

       

      I only saw a few having the same problem but no concrete solution. Any help will be very much appreciated.

       

      A's jboss-app.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jboss-app PUBLIC

          "-//JBoss//DTD J2EE Application 1.4//EN"

          "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">

      <jboss-app>

        <loader-repository>A:archive=A.ear</loader-repository>

      </jboss-app>

       

      A's jboss-classloading xml

      <?xml version="1.0" encoding="UTF-8"?>

       

      <classloading xmlns="urn:jboss:classloading:1.0"

                    parent-first="false"

                    domain="A.ear"

                    top-level-classloader="true"

                    parent-domain="DefaultDomain"

                    export-all="ALL"

                    import-all="true">

      </classloading>

       

      A's ejb jboss.xml

      <loader-repository>A:archive=A.ear</loader-repository>

      <classloading xmlns="urn:jboss:classloading:1.0"

                    parent-first="false"

                    domain="A_Ejb.jar"

                    top-level-classloader="true"

                    parent-domain="A.ear"

                    export-all="NON_EMPTY"

                    import-all="true">

      </classloading>

       

      B's jboss-app xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jboss-app PUBLIC

          "-//JBoss//DTD J2EE Application 1.4//EN"

          "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">

      <jboss-app>

        <loader-repository>B:archive=B.ear<loader-repository-config>java2ParentDelegation=false</loader-repository-config>

        </loader-repository>

      </jboss-app>

       

      B's jboss-classloading xml

      <?xml version="1.0" encoding="UTF-8"?>

      <classloading xmlns="urn:jboss:classloading:1.0"

                    domain="B.ear"

                    top-level-classloader="true"

                    export-all="ALL"

                    import-all="true">

      </classloading>

       

      B's ejb jboss xml

      <loader-repository>RequestManager:archive=TSM.ear<loader-repository-config>java2ParentDelegation=false</loader-repository-config>

       

      B's ejb jboss classloading xml

      <?xml version="1.0" encoding="UTF-8"?>

      <classloading xmlns="urn:jboss:classloading:1.0"

                    parent-first="false"

                    domain="B_ejb.jar"

                    top-level-classloader="true"

                    parent-domain="B.ear"

                    export-all="NON_EMPTY"

                    import-all="true">

      </classloading>

       

      Any help will be very much appreaciated.

       

      Thanks and regards,

      Rodel