Intra-VM Remote Calls not working with #readResolve Parameters

Solution Unverified - Updated -

Issue

If an intra-vm @Remote call contains Parameters with #readResolve (e.g. com.google.common.collect#ImmutableList) we get the following failure.

java.lang.IllegalArgumentException: object is not an instance of declaring class
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:601)
    org.jboss.marshalling.reflect.SerializableClass.callReadResolve(SerializableClass.java:338)
    org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:259)
    org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:134)
    org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:268)
    org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:259)
    org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:170)
    org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)
    org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)
    org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
    org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:125)
    org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
    org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
    org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
    org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
    $Proxy101.foo(Unknown Source)

Environment

  • JBoss Enterprise Application Platform (EAP) 6.0.0.GA

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.