I want to package Spring in my deployment along with JBossWS-CXF
Issue
- I want to use Spring with JBossWS-CXF
- I have a Spring application in the same deployment as a JAX-WS web service, and I have JBossWS-CXF installed.
- I get exceptions when I make the first request to my web service. Something similar to:
2011-12-14 16:38:21,932 WARNING [org.apache.cxf.bus.spring.SpringBusFactory] (http-127.0.0.1-8180-1) Initial attempt to crate application context was unsuccessful.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.soap.customEditorConfigurer' defined in URL [vfszip:/example.ear]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.util.ArrayList] to required type [org.springframework.beans.PropertyEditorRegistrar[]] for property 'propertyEditorRegistrars'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.apache.cxf.binding.soap.spring.SoapVersionRegistrar] to required type [org.springframework.beans.PropertyEditorRegistrar] for property 'propertyEditorRegistrars[0]': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
...
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.util.ArrayList] to required type [org.springframework.beans.PropertyEditorRegistrar[]] for property 'propertyEditorRegistrars'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.apache.cxf.binding.soap.spring.SoapVersionRegistrar] to required type [org.springframework.beans.PropertyEditorRegistrar] for property 'propertyEditorRegistrars[0]': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
... 41 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [org.apache.cxf.binding.soap.spring.SoapVersionRegistrar] to required type [org.springframework.beans.PropertyEditorRegistrar] for property 'propertyEditorRegistrars[0]': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:124)
at org.springframework.beans.TypeConverterDelegate.convertToTypedArray(TypeConverterDelegate.java:393)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:186)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
... 45 more
2011-12-14 16:38:22,338 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/customer-service-ear-0.0.1-SNAPSHOT-customer-service-0.0.1-SNAPSHOT]] (http-127.0.0.1-8180-1) StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CustomerServiceEndpointBean': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
...
Caused by: java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
...
Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.Connector from BaseClassLoader@dc8cc59{vfsfile:/$JBOSS_HOME/server/$PROFILE/deployers/jbossws.deployer/}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:477)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 54 more
- Another exception looks like
[org.springframework.context.annotation.AnnotationConfigApplicationContext]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389)
at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:358)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.1.x
- 5.2.x
- JBossWS-CXF
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
