cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse" <...@envoisolutions.com>
Subject Re: CXFServlet & tomcat
Date Mon, 02 Apr 2007 14:15:02 GMT
Hi Yeray,

I just changed how the CXF servlet worked on friday and forgot to update the
sample. I'll update this today, but in the mean time you can try this format
for cxf-servlet.xml instead:

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:jaxws="http://cxf.apache.org/jaxws"
      xmlns:soap="http://cxf.apache.org/bindings/soap"
      xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">

  <jaxws:endpoint
    id="hello_world"
    address="/services/greeter"
      implementor="demo.hw.server.GreeterImpl"
      wsdlLocation="WEB-INF/wsdl/hello_world.wsdl" />

</beans>

Thanks,
- Dan

On 4/2/07, Yeray Cabrera <yeray.cabrera@gmail.com> wrote:
>
> Hi  Willem,
>
> I´m working with the latest snapshot but now I have the folowing
> exception:
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Line 1 in
> XML document from /WEB-INF/cxf-servlet.xml is invalid; nested exception is
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'endpoints'.
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
> (XmlBeanDefinitionReader.java:417)
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> (XmlBeanDefinitionReader.java:357)
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> (XmlBeanDefinitionReader.java:334)
>         org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(
> CXFServlet.java:174)
>         org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(
> CXFServlet.java:146)
>         org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java
> :93)
>         org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:432)
>         org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:105)
>         org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:148)
>         org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:869)
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:664)
>         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
>         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
>         java.lang.Thread.run(Unknown Source)
>
>
> The cxf-servlet is OK. I'm testing with the helloword sample.
>
> Thanks
>
>
>
> Willem Jiang escribió:
> > Hi Yeray,
> >
> > I just found the cxf-* jars you used are 2.0-incubator-M1 release.
> > Current CXF trunk distribution jars' tage are 2.0-incubator-RC.
> > There are some changes of  CXF servlet between the 2.0-incubator-M1
> > and 2.0-incubator-RC.
> > Please use the latest snapshot ;)
> >
> > Cheers,
> >
> > Willem.
> >
> > Yeray Cabrera wrote:
> >> Hi Dan,
> >>
> >> I`m only using the cxf-2.0-incubator-M1 jars:
> >>
> >> activation-1.1.jar
> >> aopalliance-1.0.jar
> >> commons-logging-1.1.jar
> >> cxf-api-2.0-incubator-M1.jar
> >> cxf-common-schemas-2.0-incubator-M1.jar
> >> cxf-common-utilities-2.0-incubator-M1.jar
> >> cxf-incubator.jar
> >> cxf-integration-jca-2.0-incubator-M1.jar
> >> cxf-metacode-2.0-incubator-M1.jar
> >> cxf-rt-bindings-http-2.0-incubator-M1.jar
> >> cxf-rt-bindings-soap-2.0-incubator-M1.jar
> >> cxf-rt-bindings-xml-2.0-incubator-M1.jar
> >> cxf-rt-core-2.0-incubator-M1.jar
> >> cxf-rt-databinding-jaxb-2.0-incubator-M1.jar
> >> cxf-rt-frontend-jaxws-2.0-incubator-M1.jar
> >> cxf-rt-frontend-js-2.0-incubator-M1.jar
> >> cxf-rt-frontend-simple-2.0-incubator-M1.jar
> >> cxf-rt-management-2.0-incubator-M1.jar
> >> cxf-rt-transports-http-2.0-incubator-M1.jar
> >> cxf-rt-transports-jms-2.0-incubator-M1.jar
> >> cxf-rt-transports-local-2.0-incubator-M1.jar
> >> cxf-rt-ws-addr-2.0-incubator-M1.jar
> >> cxf-rt-ws-policy-2.0-incubator-M1.jar
> >> cxf-rt-ws-rm-2.0-incubator-M1.jar
> >> cxf-tools-common-2.0-incubator-M1.jar
> >> cxf-tools-java2wsdl-2.0-incubator-M1.jar
> >> cxf-tools-misctools-2.0-incubator-M1.jar
> >> cxf-tools-validator-2.0-incubator-M1.jar
> >> cxf-tools-wsdl2java-2.0-incubator-M1.jar
> >> cxf-tools-xjc-cfg-2.0-incubator-M1.jar
> >> cxf-tools-xjc-dv-2.0-incubator-M1.jar
> >> geronimo-jms_1.1_spec-1.0.1.jar
> >> jaxb-api-2.0.jar
> >> jaxb-impl-2.0.3.jar
> >> jaxb-xjc-2.0.3.jar
> >> jaxws-api-2.0.jar
> >> jettison-1.0-alpha-1.jar
> >> jra-1.0-alpha-1.jar
> >> jsr181-api-1.0-MR1.jar
> >> jsr250-api-1.0.jar
> >> mail-1.4.jar
> >> mysql-connector-java-3.0.16-ga-bin.jar
> >> org.mortbay.jetty-5.1.11.jar
> >> saaj-api-1.3.jar
> >> saaj-impl-1.3.jar
> >> servicemix-jbi-2.0.2.jar
> >> servlet-api.jar
> >> spring-aop-2.0.jar
> >> spring-beans-2.0.jar
> >> spring-context-2.0.jar
> >> spring-core-2.0.jar
> >> stax-api-1.0.1.jar
> >> wsdl4j-1.6.1.jar
> >> wstx-asl-3.0.2.jar
> >> XmlSchema-1.1.jar
> >>
> >>
> >> I'm using Tomcat 5.5.20 and  JRE 1.5
> >>
> >> Thanks
> >>
> >> Dan Diephouse escribió:
> >>> Hiya Yeray,,
> >>>
> >>> Well that's a new exception to me :-) Some questions:
> >>> - What JAXB jars do you have on your classpath? A list of all your
> jars
> >>> would be helpful too.
> >>> - What Java version are you using?
> >>>
> >>> Hopefully that will help us figure out what is going wrong. Regards,
> >>> - Dan
> >>>
> >>> On 3/29/07, Yeray Cabrera <yeray.cabrera@gmail.com> wrote:
> >>>>
> >>>> Hi  (Excuse my English)
> >>>>
> >>>> I´m a new user of  WS and CXF and I need help,  please.
> >>>>
> >>>> I'm trying a deployment in tomcat a I'm having problems.
> >>>>
> >>>> Thanks
> >>>>
> >>>> My out:
> >>>>
> >>>> GRAVE: StandardWrapper.Throwable
> >>>> org.springframework.beans.factory.BeanCreationException: Error
> >>>> creating
> >>>> bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class
> path
> >>>> resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
> >>>> exception is org.springframework.beans.BeanInstantiationException:
> >>>> Could
> >>>> not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
> >>>> Constructor threw exception; nested exception is
> >>>> java.lang.NullPointerException
> >>>> Caused by: org.springframework.beans.BeanInstantiationException:
> Could
> >>>> not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
> >>>> Constructor threw exception; nested exception is
> >>>> java.lang.NullPointerException
> >>>> Caused by: java.lang.NullPointerException
> >>>>     at javax.xml.bind.ContextFinder.find(ContextFinder.java:280)
> >>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
> >>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> >>>>     at
> >>>> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(
> >>>> JAXBExtensionHelper.java:74)
> >>>>     at
> >>>> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(
> >>>> JAXBExtensionHelper.java:67)
> >>>>     at
> >>>> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(
> >>>> WSDLManagerImpl.java:189)
> >>>>     at
> >>>> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java
> >>>> :75)
> >>>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >>>> Method)
> >>>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> >>>> Source)
> >>>>     at
> >>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> >>>> Source)
> >>>>     at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >>>>     at
> >>>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java
> :82)
> >>>>
> >>>>     at
> >>>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java
> :59)
> >>>>
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
> >>>>
> >>>> (SimpleInstantiationStrategy.java:52)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:639)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:625)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:380)
> >>>>     at
> >>>>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> >>>>
> >>>> AbstractBeanFactory.java:245)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> >>>>
> >>>> (DefaultSingletonBeanRegistry.java:141)
> >>>>     at
> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (
> >>>> AbstractBeanFactory.java:242)
> >>>>     at
> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (
> >>>> AbstractBeanFactory.java:156)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> >>>>
> >>>> (DefaultListableBeanFactory.java:290)
> >>>>     at
> >>>>
> org.springframework.context.support.AbstractApplicationContext.refresh(
> >>>>
> >>>> AbstractApplicationContext.java:348)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :84)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :73)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :64)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.getDefaultBus(
> >>>> SpringBusFactory.java:54)
> >>>>     at com.ias.ibms.CXFServlet.init(CXFServlet.java:111)
> >>>>     at
> >>>> org.apache.catalina.core.StandardWrapper.loadServlet(
> StandardWrapper.java
> >>>>
> >>>> :1105)
> >>>>     at
> >>>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java
> :932)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.core.StandardContext.loadOnStartup(
> >>>> StandardContext.java:3951)
> >>>>     at
> >>>> org.apache.catalina.core.StandardContext.start(StandardContext.java
> :4225)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java
> >>>>
> >>>> :759)
> >>>>     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
> >>>> :904)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.deployDirectories(
> HostConfig.java
> >>>>
> >>>> :867)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
> :474)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> >>>> LifecycleSupport.java:119)
> >>>>     at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >>>> :1021)
> >>>>     at
> >>>> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> >>>>     at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >>>> :1013)
> >>>>     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
> :709)
> >>>>     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
> :294)
> >>>>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> >>>> 29-mar-2007 13:51:50
> >>>> org.apache.catalina.core.StandardContextloadOnStartup
> >>>> GRAVE: El Servlet /ibms lanzó excepción de load()
> >>>> java.lang.NullPointerException
> >>>>     at javax.xml.bind.ContextFinder.find(ContextFinder.java:280)
> >>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
> >>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> >>>>     at
> >>>> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(
> >>>> JAXBExtensionHelper.java:74)
> >>>>     at
> >>>> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(
> >>>> JAXBExtensionHelper.java:67)
> >>>>     at
> >>>> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(
> >>>> WSDLManagerImpl.java:189)
> >>>>     at
> >>>> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java
> >>>> :75)
> >>>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >>>> Method)
> >>>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> >>>> Source)
> >>>>     at
> >>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> >>>> Source)
> >>>>     at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >>>>     at
> >>>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java
> :82)
> >>>>
> >>>>     at
> >>>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java
> :59)
> >>>>
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
> >>>>
> >>>> (SimpleInstantiationStrategy.java:52)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:639)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:625)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> >>>>
> >>>> (AbstractAutowireCapableBeanFactory.java:380)
> >>>>     at
> >>>>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> >>>>
> >>>> AbstractBeanFactory.java:245)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> >>>>
> >>>> (DefaultSingletonBeanRegistry.java:141)
> >>>>     at
> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (
> >>>> AbstractBeanFactory.java:242)
> >>>>     at
> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (
> >>>> AbstractBeanFactory.java:156)
> >>>>     at
> >>>>
> >>>>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> >>>>
> >>>> (DefaultListableBeanFactory.java:290)
> >>>>     at
> >>>>
> org.springframework.context.support.AbstractApplicationContext.refresh(
> >>>>
> >>>> AbstractApplicationContext.java:348)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :84)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :73)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.createBus(
> SpringBusFactory.java
> >>>>
> >>>> :64)
> >>>>     at
> >>>> org.apache.cxf.bus.spring.SpringBusFactory.getDefaultBus(
> >>>> SpringBusFactory.java:54)
> >>>>     at com.ias.ibms.CXFServlet.init(CXFServlet.java:111)
> >>>>     at
> >>>> org.apache.catalina.core.StandardWrapper.loadServlet(
> StandardWrapper.java
> >>>>
> >>>> :1105)
> >>>>     at
> >>>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java
> :932)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.core.StandardContext.loadOnStartup(
> >>>> StandardContext.java:3951)
> >>>>     at
> >>>> org.apache.catalina.core.StandardContext.start(StandardContext.java
> :4225)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java
> >>>>
> >>>> :759)
> >>>>     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
> >>>> :904)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.deployDirectories(
> HostConfig.java
> >>>>
> >>>> :867)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
> :474)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
> >>>>     at
> >>>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
> >>>>
> >>>>     at
> >>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> >>>> LifecycleSupport.java:119)
> >>>>     at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >>>> :1021)
> >>>>     at
> >>>> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> >>>>     at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >>>> :1013)
> >>>>     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
> :709)
> >>>>     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
> :294)
> >>>>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> >>>>
> >>>
> >>>
> >>>
> >>
> >
> >
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message