Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5160

Switchyard EAR fails to deploy when interface is in war or isolated jar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • SwitchYard
    • None
    • % %
    • Hide

      Build and deploy the attached, modified version of the ear-deployment quickstart. The modifications are the following:
      1. Added jboss-deployment-structure.xml with <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
      2. Moved one of the service interfaces from the shared jar to the switchyard app jar

      Show
      Build and deploy the attached, modified version of the ear-deployment quickstart. The modifications are the following: 1. Added jboss-deployment-structure.xml with <ear-subdeployments-isolated>true</ear-subdeployments-isolated> 2. Moved one of the service interfaces from the shared jar to the switchyard app jar

    Description

      Deployment of a Switchyard application, bundled as an *.ear file with the structure shown below fails:

      *.ear
      `- META-INF/jboss-deployment-structure.xml:
           <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
      `- switchyard-app.jar:
           contains service interfaces
      

      Failure:

      09:12:04,089 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "switchyard-ear-deployment.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"switchyard-ear-deployment.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"switchyard-ear-deployment.ear\".WeldStartService: Failed to start service
          Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
      Exception 0 :
      java.lang.IllegalArgumentException: interface org.switchyard.quickstarts.demo.multiapp.service.InventoryService is not visible from class loader
      	at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
      	at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
      	at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
      	at java.lang.reflect.WeakCache.get(WeakCache.java:127)
      	at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
      	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
      	at org.switchyard.component.bean.ClientProxyBean.<init>(ClientProxyBean.java:103)
      	at org.switchyard.component.bean.SwitchYardCDIServiceDiscovery.addClientProxyBean(SwitchYardCDIServiceDiscovery.java:174)
      	at org.switchyard.component.bean.SwitchYardCDIServiceDiscovery.addInjectableClientProxyBean(SwitchYardCDIServiceDiscovery.java:162)
      	at org.switchyard.component.bean.SwitchYardCDIServiceDiscovery.processBean(SwitchYardCDIServiceDiscovery.java:107)
      	at org.switchyard.component.bean.SwitchYardCDIServiceDiscovery$Proxy$_$$_WeldClientProxy.processBean(SwitchYardCDIServiceDiscovery$Proxy$_$$_WeldClientProxy.java)
      	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      The following approaches can be taken to successfully deploy the application:
      1. ear-subdeployments-isolated=false
      2. bundle service interfaces in *.ear/lib/custom-interfaces.jar

      However, these workarounds do not meet these requirements:
      re 1. Allow isolated = true, to prevent that the (sub-deployment) jar files see each other.
      re 2. Internal interfaces (specific to one switchyard application) should be bundled in that application, and not in a shared jar.

      Note: this issue seems related to https://issues.jboss.org/browse/SWITCHYARD-1932, with the difference that this JIRA is related to isolated jar files instead of war files in the ear.

      Attachments

        Issue Links

          Activity

            People

              toigaras@redhat.com tomohisa igarashi
              rhn-support-mputz Martin Weiler (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: