Problem with an OSGi bundle with CXF SOAP web services
oren Aug 23, 2009 10:41 PMDear All,
I have a bundle that contains some cxf soap (and rest) services. Unfortunately, it fails to start because it does not find the annotation javax.jws.WebService (the error below is in one of my spring beans declared in the dts-ws-context-services.xml that tries to add it as a property). I added javax.jws and javax.jws.soap to my import packages, but that doesn't help. I am using JDK 1.6.0_10 to run the fuse esb, and javax.jws should be part of the JVM's rt.jar. How can I let my bundle see the WebService annotation class?
Thanks so much in advance.
? | BundleEvent STARTED
20:33:40,421 | ERROR | tenderThread-152 | OsgiBundleXmlApplicationContext | gatedExecutionApplicationContext 366 | Post refresh error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'soapClasses' defined in URL bundle://242.0:0/META-INF/spring/dts-ws-context-services.xml: Cannot create inner bean 'edu.utah.further.core.util.io.AnnotatedClassResourceMatcher#405782' of type while setting bean property 'resourceMatcher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'edu.utah.further.core.util.io.AnnotatedClassResourceMatcher#405782' defined in URL bundle://242.0:0/META-INF/spring/dts-ws-context-services.xml: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is org.springframework.beans.FatalBeanException: Could not add annotation class javax.jws.WebService to the list of annotations in the annotatedClasses property of the sessionFactory declaration: java.lang.ClassNotFoundException: javax.jws.WebService
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
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:222)
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:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'edu.utah.further.core.util.io.AnnotatedClassResourceMatcher#405782' defined in URL bundle://242.0:0/META-INF/spring/dts-ws-context-services.xml: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is org.springframework.beans.FatalBeanException: Could not add annotation class javax.jws.WebService to the list of annotations in the annotatedClasses property of the sessionFactory declaration: java.lang.ClassNotFoundException: javax.jws.WebService
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
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.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
... 20 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is org.springframework.beans.FatalBeanException: Could not add annotation class javax.jws.WebService to the list of annotations in the annotatedClasses property of the sessionFactory declaration: java.lang.ClassNotFoundException: javax.jws.WebService
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
... 27 more
Caused by: org.springframework.beans.FatalBeanException: Could not add annotation class javax.jws.WebService to the list of annotations in the annotatedClasses property of the sessionFactory declaration: java.lang.ClassNotFoundException: javax.jws.WebService
at edu.utah.further.core.util.io.ClasspathUtil.loadClassWithDetailedExceptions(ClasspathUtil.java:153)
at edu.utah.further.core.util.io.AnnotatedClassResourceMatcher.toAnnotationClassSet(AnnotatedClassResourceMatcher.java:109)
at edu.utah.further.core.util.io.AnnotatedClassResourceMatcher.(AnnotatedClassResourceMatcher.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 29 more
-
dts-ws-context-services.xml 3.8 KB
-
pom.xml 10.3 KB