You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by shelly <s....@mpstechnologies.com> on 2009/07/28 17:03:38 UTC
Jetty jar dependency issue in cxf 2.2.2
Hello,
I have created a webservice using cxf2.2.2 .I am facing the issue of the
dependency of jetty jar in the webservice.
When I deploy the service in tomcat server including jetty jar then it works
fine but when I try to remove the jetty jars it gives me error at startup of
the server.
I am using Spring and Hibernate.
How can I remove the dependency of jetty from my webservice?
Is it possible to run cxf in tomcat independently without using jetty jars?
The stacktrace is
28-07-2009 19:27:31 ERROR [Thread-1]
ContextLoader.initWebApplicationContext(203) | Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'helloworldService': Invocation of init method failed; nested
exception
is java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException
: Error creating bean with name 'helloworldService': Unsatisfied dependency
expressed through constructor argument with index 0 of type
[org.apache.cxf.Bus]:
Could not convert constructor argument value of type
[helloworldservice.helloworldServiceInterfaceImpl] to required type
[org.apache.cxf.Bus]:
Failed to convert value of type
[helloworldservice.helloworldServiceInterfaceImpl] to required type
[org.apache.cxf.Bus]; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[helloworldservice.helloworldServiceInterfaceImpl] to required type
[org.apache.cxf.Bus]:
no matching editors or conversion strategy found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:383)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:353)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:169)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:242)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:400)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:736)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:369)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:244)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:187)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:49)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3727)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJetty
HTTPServerEngine(JettyHTTPServerEngineFactory.java:217)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.retrieveEngine(Jett
yHTTPDestination.java:113)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig(Jett
yHTTPDestination.java:141)
at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestinat
ion(JettyHTTPTransportFactory.java:123)
at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination
(JettyHTTPTransportFactory.java:103)
at
org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69)
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
va:167)
at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346)
at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)
at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:404)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1325)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1294)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
... 38 more
Related cause:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'helloworldService': Unsatisfied dependency
expressed through
constructor argument with index 0 of type [org.apache.cxf.Bus]: Could not
convert constructor argument value of type
[helloworldservice.helloworldServiceInterfaceImpl]
to required type [org.apache.cxf.Bus]: Failed to convert value of type
[helloworldservice.helloworldServiceInterfaceImpl] to required type
[org.apache.cxf.Bus]; nested exception
is java.lang.IllegalArgumentException: Cannot convert value of type
[helloworldservice.helloworldServiceInterfaceImpl] to required type
[org.apache.cxf.Bus]: no matching editors
or conversion strategy found
at
org.springframework.beans.factory.support.ConstructorResolver.createArgument
Array(ConstructorResolver.java:534)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstr
uctor(ConstructorResolver.java:186)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.autowireConstructor(AbstractAutowireCapableBeanFactory.java:855)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBeanInstance(AbstractAutowireCapableBeanFactory.java:765)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:412)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:383)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:353)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:169)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:242)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:400)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:736)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:369)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:244)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:187)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:49)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3727)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
59)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
-- Shelly