Enunciate
  1. Enunciate
  2. ENUNCIATE-229

Unable to initialize EPCISServicePortTypeImpl...FactoryBean is not fully initialized yet

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.10
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBoss 5.0.1
      JDK 1.6.0_11
      Maven 2.0.9
      Enunciate 1.10-SNAPSHOT
    • Number of attachments :
      3

      Description

      As a next step of the work done by Håvard in ENUNCIATE-221, I have added a reference to a EJB3 Sessionbean to the EPCISServicePortTypeImpl using @EJB annotation and tried to deploy it to a JBoss 5.0.1 AS. When the ear file is deployed I get the stacktrace attached in output.txt.

      I will attach stacktrace, EPCISServicePortTypeImpl, and the code of the session bean implementation. Any other resources you will need? I can provide you the ear file if needed as well.

      1. EPCISServicePortTypeImpl.java
        8 kB
        Viggo Navarsete
      2. GQI2SessionFacade.java
        2 kB
        Viggo Navarsete
      3. output.txt
        77 kB
        Viggo Navarsete

        Activity

        Hide
        Viggo Navarsete added a comment -

        Tried to remove jaxb-api-2.1jar, jaxb-impl-2.1.8.jar, saaj-api-1.3.jar, saaj-impl-1.3.jar from the ear file,
        and got the following stacktrace:
        22:03:13,205 ERROR [[/epcis]] StandardWrapper.Throwable
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in ServletContext resource [/WEB-INF/jaxws-servlet.xml]: Cannot resolve reference to bean 'jaxws-service-EPCISServicePortTypeService' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxws-service-EPCISServicePortTypeService': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
        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)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
        at org.codehaus.enunciate.modules.jaxws_ri.WSSpringServlet.init(WSSpringServlet.java:58)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
        Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxws-service-EPCISServicePortTypeService': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
        ... 33 more
        Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature
        at com.sun.xml.ws.model.RuntimeModeler.processDocBareMethod(RuntimeModeler.java:1081)
        at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:540)
        at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371)
        at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
        at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
        at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
        at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
        at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333)
        at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
        ... 41 more
        22:03:13,206 ERROR [[jaxws]] Allocate exception for servlet jaxws
        java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature
        at com.sun.xml.ws.model.RuntimeModeler.processDocBareMethod(RuntimeModeler.java:1081)
        at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:540)
        at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371)
        at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
        at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
        at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
        at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
        at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333)
        at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
        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)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
        at org.codehaus.enunciate.modules.jaxws_ri.WSSpringServlet.init(WSSpringServlet.java:58)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

        Show
        Viggo Navarsete added a comment - Tried to remove jaxb-api-2.1jar, jaxb-impl-2.1.8.jar, saaj-api-1.3.jar, saaj-impl-1.3.jar from the ear file, and got the following stacktrace: 22:03:13,205 ERROR [ [/epcis] ] StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in ServletContext resource [/WEB-INF/jaxws-servlet.xml] : Cannot resolve reference to bean 'jaxws-service-EPCISServicePortTypeService' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxws-service-EPCISServicePortTypeService': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) 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) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.codehaus.enunciate.modules.jaxws_ri.WSSpringServlet.init(WSSpringServlet.java:58) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jaxws-service-EPCISServicePortTypeService': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ... 33 more Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature at com.sun.xml.ws.model.RuntimeModeler.processDocBareMethod(RuntimeModeler.java:1081) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:540) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333) at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) ... 41 more 22:03:13,206 ERROR [ [jaxws] ] Allocate exception for servlet jaxws java.lang.LinkageError: loader constraint violation: when resolving method "com.sun.xml.bind.api.TypeReference.<init>(Ljavax/xml/namespace/QName;Ljava/lang/reflect/Type;[Ljava/lang/annotation/Annotation;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/xml/ws/model/RuntimeModeler, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/sun/xml/bind/api/TypeReference, have different Class objects for the type javax/xml/namespace/QName used in the signature at com.sun.xml.ws.model.RuntimeModeler.processDocBareMethod(RuntimeModeler.java:1081) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:540) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333) at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) 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) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.codehaus.enunciate.modules.jaxws_ri.WSSpringServlet.init(WSSpringServlet.java:58) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
        Hide
        Viggo Navarsete added a comment -

        Hi Ryan,

        I've found a solution, so please don't spend more time destroying you brain on this issue I promise to write more later tonight about the solution so other people can learn from it as well

        Show
        Viggo Navarsete added a comment - Hi Ryan, I've found a solution, so please don't spend more time destroying you brain on this issue I promise to write more later tonight about the solution so other people can learn from it as well
        Hide
        Viggo Navarsete added a comment -

        Hi all,

        in order to get the Enunciate + EJB3 (+JBoss 5.0.1) combo to work please do the following:

        1. Create a spring beans file like this (called i.e. custom-beans.xml):
        <?xml version="1.0" encoding="UTF-8"?>
        <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:jee="http://www.springframework.org/schema/jee"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
        <jee:jndi-lookup jndi-name="<name of ear>/<name of EJB>/local" id="someId" ></jee:jndi-lookup>
        <bean class="com.test.ServiceEndPointPortTypeImpl">
        <property name="ejbService" ref="someId" />
        </bean>
        </beans>

        Note: The jndi-nameis JBoss 5.x specific (I think), it could be different for other containers like GlassFish, Websphere etc..

        where:

        • <name of ear> is the name of the ear (without the .ear extension), i.e MyEar:
        • <name of EJB> is the name of the EJB business interface (without the package declaration), i.e MySessionBeanLocalcontainers like GlassFish, Websphere etc..
        • <someId> is an id which is referred to in the bean definition of the endpoint class
        • com.test.ServiceEndPointPortTypeImpl is the endpoint class generated from Enunciate.

        2. In your enunciate.xml wire up the spring beans file like this:
        <spring-app>
        <springImport file="src/main/resources/custom-beans.xml" />
        </spring-app>

        3. In your service endpoint implementation class add a property which will refer to your EJB3 session bean:
        private MySessionBeanLocal ejbService; // the 'ejbService' must match the property in the Spring beans file

        public void setMySessionBeanLocal(MySessionBeanLocal ejbService)

        { this.ejbService = ejbService; }

        4. I had to remove the following dependencies from my ear file due to classloader issues when deployed to JBoss 5.0.1 (it could be different for other containers..):

        • stax-api
        • jaxb-api
        • jaxb-impl
        • saaj-api
        • saaj-impl

        You should now be able to inject your EJB3 session bean into you enunciate endpoint with no further actions Case closed!

        Show
        Viggo Navarsete added a comment - Hi all, in order to get the Enunciate + EJB3 (+JBoss 5.0.1) combo to work please do the following: 1. Create a spring beans file like this (called i.e. custom-beans.xml): <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd "> <jee:jndi-lookup jndi-name="<name of ear>/<name of EJB>/local" id="someId" ></jee:jndi-lookup> <bean class="com.test.ServiceEndPointPortTypeImpl"> <property name="ejbService" ref="someId" /> </bean> </beans> Note: The jndi-nameis JBoss 5.x specific (I think), it could be different for other containers like GlassFish, Websphere etc.. where: <name of ear> is the name of the ear (without the .ear extension), i.e MyEar: <name of EJB> is the name of the EJB business interface (without the package declaration), i.e MySessionBeanLocalcontainers like GlassFish, Websphere etc.. <someId> is an id which is referred to in the bean definition of the endpoint class com.test.ServiceEndPointPortTypeImpl is the endpoint class generated from Enunciate. 2. In your enunciate.xml wire up the spring beans file like this: <spring-app> <springImport file="src/main/resources/custom-beans.xml" /> </spring-app> 3. In your service endpoint implementation class add a property which will refer to your EJB3 session bean: private MySessionBeanLocal ejbService; // the 'ejbService' must match the property in the Spring beans file public void setMySessionBeanLocal(MySessionBeanLocal ejbService) { this.ejbService = ejbService; } 4. I had to remove the following dependencies from my ear file due to classloader issues when deployed to JBoss 5.0.1 (it could be different for other containers..): stax-api jaxb-api jaxb-impl saaj-api saaj-impl You should now be able to inject your EJB3 session bean into you enunciate endpoint with no further actions Case closed!
        Hide
        Viggo Navarsete added a comment -

        and here is how I managed to exclude the dependencies using my pom.xml:
        <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>enunciate-rt</artifactId>
        <version>1.10-SNAPSHOT</version>
        </dependency>
        <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>enunciate-rest-rt</artifactId>
        <version>1.10-SNAPSHOT</version>
        <exclusions>
        <exclusion>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        <dependency>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>enunciate-jaxws-ri-rt</artifactId>
        <version>1.10-SNAPSHOT</version>
        <exclusions>
        <exclusion>
        <groupId>stax</groupId>
        <artifactId>stax-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>javax.xml.soap</groupId>
        <artifactId>saaj-api</artifactId>
        </exclusion>
        <exclusion>
        <groupId>com.sun.xml.messaging.saaj</groupId>
        <artifactId>saaj-impl</artifactId>
        </exclusion>
        </exclusions>
        </dependency>

        Show
        Viggo Navarsete added a comment - and here is how I managed to exclude the dependencies using my pom.xml: <dependency> <groupId>org.codehaus.enunciate</groupId> <artifactId>enunciate-rt</artifactId> <version>1.10-SNAPSHOT</version> </dependency> <dependency> <groupId>org.codehaus.enunciate</groupId> <artifactId>enunciate-rest-rt</artifactId> <version>1.10-SNAPSHOT</version> <exclusions> <exclusion> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </exclusion> <exclusion> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.codehaus.enunciate</groupId> <artifactId>enunciate-jaxws-ri-rt</artifactId> <version>1.10-SNAPSHOT</version> <exclusions> <exclusion> <groupId>stax</groupId> <artifactId>stax-api</artifactId> </exclusion> <exclusion> <groupId>javax.xml.soap</groupId> <artifactId>saaj-api</artifactId> </exclusion> <exclusion> <groupId>com.sun.xml.messaging.saaj</groupId> <artifactId>saaj-impl</artifactId> </exclusion> </exclusions> </dependency>
        Hide
        Ryan Heaton added a comment -

        Thanks a ton for the work. I'll put a link to this on the FAQ.

        Show
        Ryan Heaton added a comment - Thanks a ton for the work. I'll put a link to this on the FAQ.

          People

          • Assignee:
            Ryan Heaton
            Reporter:
            Viggo Navarsete
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: