[jboss-jira] [JBoss JIRA] (WFLY-12032) Follow-up: java.rmi is not visible from EJBServerChannel
Tomas Hofman (Jira)
issues at jboss.org
Tue May 14 07:14:00 EDT 2019
[ https://issues.jboss.org/browse/WFLY-12032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733114#comment-13733114 ]
Tomas Hofman commented on WFLY-12032:
-------------------------------------
So the difference between the two EAP versions is that in 7.0 a request is unmarshalled with TCCL set to deployment CL, while in 7.2 it's the "org.wildfly.extension.io" module CL.
I'm testing this change to set TCCL to deployment CL:
https://github.com/TomasHofman/wildfly/commit/6f1ad24c7d1fc4e3fbbb57bbe66d3e05bbeece54
and the reproducer passes.
Stacktrace to where the CNF happens is:
{code}
"default task-1 at 14754" prio=5 tid=0x8f nid=NA runnable
java.lang.Thread.State: RUNNABLE
at sun.rmi.transport.DGCImpl_Stub.dirty(DGCImpl_Stub.java:131)
at sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:382)
at sun.rmi.transport.DGCClient$EndpointEntry.registerRefs(DGCClient.java:324)
at sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:160)
at sun.rmi.transport.LiveRef.read(LiveRef.java:312)
at sun.rmi.server.UnicastRef.readExternal(UnicastRef.java:489)
at java.rmi.server.RemoteObject.readObject(RemoteObject.java:455)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source:-1)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:179)
at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1746)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1715)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1395)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNestedObject(RiverUnmarshaller.java:161)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1372)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.jboss.ejb.protocol.remote.EJBServerChannel$RemotingInvocationRequest.getRequestContent(EJBServerChannel.java:813)
at org.jboss.as.ejb3.remote.AssociationImpl.receiveInvocationRequest(AssociationImpl.java:134)
at org.jboss.ejb.protocol.remote.EJBServerChannel$ReceiverImpl.handleInvocationRequest(EJBServerChannel.java:451)
at org.jboss.ejb.protocol.remote.EJBServerChannel$ReceiverImpl.handleMessage(EJBServerChannel.java:189)
at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
at org.jboss.remoting3.remote.RemoteConnectionChannel$$Lambda$805.152281423.run(Unknown Source:-1)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:949)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor$$Lambda$791.519592176.run(Unknown Source:-1)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
{code}
> Follow-up: java.rmi is not visible from EJBServerChannel
> --------------------------------------------------------
>
> Key: WFLY-12032
> URL: https://issues.jboss.org/browse/WFLY-12032
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 16.0.0.Final
> Reporter: Tomas Hofman
> Priority: Major
>
> This is follow up issue for JBEAP-16725, which was resolved with a workaround - javax.rmi was added as a dependency of wildfly.extension.io module.
> The root cause is probably inside jboss-modules.
> The issue is following:
> * a standalone EJB client invokes remote EJB, and passes an object as an argument;
> * server (trying to use the remote object) fails with "java.lang.ClassNotFoundException: java.rmi.dgc.Lease" (stacktrace bellow).
> If a short delay ({{Thread.sleep(100)}}) is introduced on the server side, before manipulating the remote object, the invocation succeeds.
> {code}
> java.lang.ClassNotFoundException: java.rmi.dgc.Lease from [Module "org.wildfly.extension.io" version 6.0.12.Final-redhat-00001 from local module loader @6a024a67 (finder: local module finder @7921b0a2 (roots: /tmp/jboss-eap-7.2/modules,/tmp/jboss-eap-7.2/modules/system/layers/base))] (no security manager: RMI class loader disabled)
> (default task-2) java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:97)
> (default task-2) sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:396)
> (default task-2) sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
> (default task-2) java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
> (default task-2) java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
> (default task-2) sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:219)
> (default task-2) java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1868)
> (default task-2) java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1751)
> (default task-2) java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2042)
> (default task-2) java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
> (default task-2) java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
> (default task-2) sun.rmi.transport.DGCImpl_Stub.dirty(DGCImpl_Stub.java:125)
> (default task-2) sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:382)
> (default task-2) sun.rmi.transport.DGCClient$EndpointEntry.registerRefs(DGCClient.java:324)
> (default task-2) sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:160)
> (default task-2) sun.rmi.transport.LiveRef.read(LiveRef.java:312)
> (default task-2) sun.rmi.server.UnicastRef.readExternal(UnicastRef.java:489)
> (default task-2) java.rmi.server.RemoteObject.readObject(RemoteObject.java:455)
> (default task-2) sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
> (default task-2) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> (default task-2) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> (default task-2) java.lang.reflect.Method.invoke(Method.java:498)
> (default task-2) org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:179)
> (default task-2) org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1746)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1715)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1715)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1395)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
> (default task-2) org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
> (default task-2) org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
> (default task-2) org.jboss.ejb.protocol.remote.EJBServerChannel$RemotingInvocationRequest.getRequestContent(EJBServerChannel.java:813)
> (default task-2) org.jboss.as.ejb3.remote.AssociationImpl.receiveInvocationRequest(AssociationImpl.java:130)
> (default task-2) org.jboss.ejb.protocol.remote.EJBServerChannel$ReceiverImpl.handleInvocationRequest(EJBServerChannel.java:451)
> (default task-2) org.jboss.ejb.protocol.remote.EJBServerChannel$ReceiverImpl.handleMessage(EJBServerChannel.java:189)
> (default task-2) org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
> (default task-2) org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:949)
> (default task-2) org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> (default task-2) org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> (default task-2) org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> (default task-2) org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> (default task-2) java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list