Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7806

WS endpoint instantiation fails with EAR classloader isolation

XMLWordPrintable

      • configure EARClassLoaderDeployer to use isolated classloaders
      • install JBossWS-CXF
      • deploy the service (hello-service)
      • invoke the webservice
    • NEW

      I've implemented a standard JAX-WS based webservice endpoint implementation bean as an EJB 3.0 stateless session bean. The endpoint implementation is packaged as an EAR and the package contains Spring framework 3.0 jars.

      EAP has been configured to use JBossWS-CXF.
      When I configure EARClassLoaderDeployer to use isolated classloaders (isolated=true) in:
      server/$PROFILE/deployers/ear-deployer-jboss-beans.xml

      I get the following error when invoking the webservice:

      ...
      2011-12-21 22:37:20,537 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hello-service-ear-0.0.1-SNAPSHOT-hello-service-ejb-0.0.1-SNAPSHOT]] (http-127.0.0.1-8180-1) StandardWrapper.Throwable
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HelloServiceEndpointBean': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      ...

      Note that while the sample code bootstraps Spring using SpringBeanAutowiringInterceptor the issue can be reproduced even if the application doesn't bootstrap Spring and just by including the Spring jars in the deployment unit.

        1. hello-service-ear-0.0.1-SNAPSHOT.ear
          1.96 MB
          Marko Asplund
        2. server-eap1.log
          21 kB
          Marko Asplund
        3. server-eap2.log
          41 kB
          Marko Asplund

              marius.bogoevici Marius Bogoevici (Inactive)
              aspa_jira Marko Asplund (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: