1 Reply Latest reply on Mar 10, 2016 3:21 PM by Wolf-Dieter Fink

    Wildfly 10 Remote EJB "Failed to marshal EJB parameters" error due to " java.io.NotSerializableException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine$1"

    Mike Baranski Newbie

      I have an EJB with a remote interface:

       

      @Stateless

      @Remote(ActorProvider.class)

      public class ActorServiceClient implements ActorProvider { ... }

       

      @Remote

      public interface ActorProvider { ... }

       

      The implementation (ActorServiceClient) is a REST client calling a remote REST service. I am injecting the client into a service EJB like so:

       

      @Stateless

      public class DataResource {

             private static final Logger L = LoggerFactory.getLogger(DataResource.class);
         @EJB
         ActorProvider actorProvider;
      ..
      }

       

      Whenever I call the actorProvider.getProfile(String someString) method from the DataResource class, I get the exception saying "Failed to marshal EJB parameters" and the serialization error.  The parameter is serializable (it's a String) and the response is serializable (this works if the EJB is not a remote invocation).

       

      Why is this happening?