Cannot use SwitchYard RemoteInvoker in a WAR deployed on FSW

Solution Verified - Updated -

Issue

  • We have a SwitchYard service which is exposed via SCA Binding. Now I want to call this service from a web app using RemoteInvoker.
  • But when I try to create an HTTPInvoker using:

    RemoteInvoker invoker = new HttpInvoker(FSW_URL);
    

    I am getting the exception below:

    Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.switchyard.serial.spi.SerializationProvider
        at org.switchyard.serial.SerializerFactory.create(SerializerFactory.java:64) [switchyard-serial-1.1.1-p5-redhat-1.jar:1.1.1-p5-redhat-1]
        at org.switchyard.remote.http.HttpInvoker.<init>(HttpInvoker.java:42) [switchyard-remote-1.1.1-p5-redhat-1.jar:1.1.1-p5-redhat-1]
        at com.example.myapp.MyServiceProcessor.invokeService(MyServiceProcessor.java:46) [classes:]
        ...
    
  • My web app is defined as webModule in an EAR which has got the SwitchYard service project as an EJB module.

  • As per Red Hat documentation the only dependency I should need is <artifactId>switchyard-remote</artifactId>, but it looks like it need few others.

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.x

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