Error listenerStart - JaxWS - JBoss as 7

I am trying to port the Jax-WS web service to JBoss as 7, but the application (deployed as a war) does not start the listener at startup.

ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-14) Error listenerStart ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-14) Context [/abc] startup failed due to previous errors ERROR [org.jboss.msc.service.fail] (MSC service thread 1-14) MSC000001: Failed to start service jboss.web.deployment.default-host (...) 

The error message for failed due to previous errors , however errors are not printed in the log. In the applications in question, jax-ws-rt looks like this:

  <dependency> <groupId>sun-jaxws</groupId> <artifactId>jaxws-rt</artifactId> <version>2.1.7</version> </dependency> 

If I change the jax-ws-rt scope to be provided, this will result in a good ClassNotFound as expected.

 WARN [org.jboss.as.ee] (MSC service thread 1-13) JBAS011006: Not installing optional component com.sun.xml.ws.transport.http.servlet.WSServletContextListener due to exception: java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener (…) 

The servlet is defined this way in web.xml.

 <listener> <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> </listener> <servlet> <description>JAX-WS endpoint for data service</description> <display-name>abc</display-name> <servlet-name>abc</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>abc</servlet-name> <url-pattern>/services/abc</url-pattern> </servlet-mapping> 

I can’t understand what happened. How to solve this problem and deploy the application?

Thoughts:

  • Am I missing addiction?
  • Can I reconfigure the war to use Jaboss JaxWS without basic refactoring?
  • If I can't use the Jabox version for internal JaxWS, can I get Jboss to use the version of Jaxws that I am building in war? (If so, what dependencies do I need for JaxWs?)
+6
source share
1 answer

with JBoss AS7 (Java EE6) you really don't need to put the WSServlet in web.xml as a servlet class. But instead you will have a cool class name annotated with @Webservice

All you want to do is make sure that in your JBoss configuration (e.g. standalone.xml) you have the extension for web services:

 <extensions> [...] <extension module="org.jboss.as.webservices"/> </extensions> 
+7
source

Source: https://habr.com/ru/post/920404/


All Articles