[jboss-remoting-issues] [JBoss JIRA] Commented: (JBREM-962) Remote classloading does not work with Isolated EARs

Ron Sigal (JIRA) jira-events at lists.jboss.org
Fri Jun 20 01:34:37 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBREM-962?page=comments#action_12418071 ] 
            
Ron Sigal commented on JBREM-962:
---------------------------------

The attached file ScopedTest.zip gives an example.  

The ant target "build" will create two EARs, titan1.ear and titan2.ear, both ot which do scoped classloading.  

Ant target "deploy" will 

* copy the EARs to $JBOSS_HOME/server/default/deploy,
* copy $JBOSS_HOME/server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml to META-INF/jboss-service.save
* copy an altered jboss-service.xml to $JBOSS_HOME/server/default/deploy/ejb3.deployer/META-INF

Ant target "test" will run a client program com.titan.client.Client which

* retrieves a com.titan.travelagent.TravelAgentBean from JNDI
* calls TravelAgentBean.getShip(), which returns an implementation of the interface com.titan.domain.Ship.

The implementation is an instance of com.titan.domain.Titanic.  Now, Client is able to get Ship from its classpath, but Titanic is available only in the titan2.ear scoped repository.

Ant target "clean" restores the original $JBOSS_HOME/server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml.

> Remote classloading does not work with Isolated EARs
> ----------------------------------------------------
>
>                 Key: JBREM-962
>                 URL: http://jira.jboss.com/jira/browse/JBREM-962
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.2.2.SP4
>         Environment: EAP4.3
>            Reporter: Magesh Kumar B
>         Assigned To: Ron Sigal
>             Fix For: 2.2.2.SP8
>
>         Attachments: ScopedTest.zip
>
>
> When user has enabled isolation in a ear file containing an EJB3 jar file, the implementation classes are not serialized and a ClassNotFoundException is thrown. I have attached a sample called HelloEJB3.zip that contains all files needed for deploying this test case. Using EAP4.3 do "ant deploy" and then do "ant test".
> When the jboss-app.xml is removed the application client works fine. This fails in the isolated mode with the below exception:
> Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.user.UserImpl
>     at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:82)
>     at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:76)
>     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Unknown Source)
>     at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:174)
>     at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
>     at java.io.ObjectInputStream.readClassDesc(Unknown Source)
>     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
>     at java.io.ObjectInputStream.readObject0(Unknown Source)
>     at java.io.ObjectInputStream.readObject(Unknown Source)
>     at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
>     at java.io.ObjectInputStream.readExternalData(Unknown Source)
>     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
>     at java.io.ObjectInputStream.readObject0(Unknown Source)
>     at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
>     at java.io.ObjectInputStream.readSerialData(Unknown Source)
>     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
>     at java.io.ObjectInputStream.readObject0(Unknown Source)
>     at java.io.ObjectInputStream.readObject(Unknown Source)
>     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:239)
>     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:133)
>     at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:120)
>     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:919)
>     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:613)
>     at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
>     at org.jboss.remoting.Client.invoke(Client.java:1634)
>     at org.jboss.remoting.Client.invoke(Client.java:548)
>     at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
>     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>     at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
>     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>     at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
>     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>     at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
>     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>     at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-remoting-issues mailing list