stephen b [
https://community.jboss.org/people/slbanal] created the discussion
"JBossWS + CXF + Maven triggers"
To view the discussion, visit:
https://community.jboss.org/message/798067#798067
--------------------------------------------------------------
Hi,
I am newbie in JBossWS and I am currently learning how to use JBossWS + CXF + Spring +
Maven. I saw a quickstart project which uses JBossWS and Maven (
http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/helloworld-ws/
http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/helloworld-ws/) and used that as
a starting point. In order to support CXF, I did the following changes (see attached files
for details).
1. Modified this project by adding CXF and Spring as dependencies
2. Created applicationContext.xml under src/main/webapp/WEB-INF/
3. Created jbossws-cxf.xml under src/main/webapp/WEB-INF/
4. Modified web.xml to load applicationContext.xml and changes url of helloworld servlet
My JBoss server is version 7.1.1.FINAL using CXF 4.1.1.
Unfortunately, given this very simple change, this combination of libraries causes JBoss
to throw an exception (example logs below). Any ideas as to what configuration /
dependencies I have to add in my POM file to make this work. I did a bit of
experimentation and renaming jbossws-cxf.xml to a temporary file name resolves the problem
but this is not what i want to achieve. I want to enable JBossWS + CXF since I am planning
to use Autowiring / injection feature of Spring with JBossWS-CXF.
17:52:01,872 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jboss-as-helloworld-ws].[HelloWorldService]]
(http--127.0.0.1-8083-1) Servlet.service() for servlet HelloWorldService threw exception:
java.lang.NoClassDefFoundError: javax/servlet/ServletException
at
org.jboss.wsf.stack.cxf.Messages_$bundle.cannotObtainDestinationFor(Messages_$bundle.java:357)
at
org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:168)
at
org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:85)
at
org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156)
at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:225)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
[jbossws-spi.jar:2.1.1.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37]
Thanks,
Stephen
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/798067#798067]
Start a new discussion in JBoss Web Services at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]