xml - Error while deploying Java based Webservice on Tomcat server 8.0 -
i trying deploy java based web service apache tomcat server 8.0. when try deploy following error :
severe: end event threw exception java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.apache.tomcat.util.introspectionutils.callmethodn(introspectionutils.java:379) @ org.apache.tomcat.util.descriptor.web.callmethodmultirule.end(webruleset.java:1034) **caused by: java.lang.illegalargumentexception: servlets named [axisservlet] , [cxf] both mapped url-pattern [/services/*] not permitted @ org.apache.tomcat.util.descriptor.web.webxml.addservletmapping(webxml.java:308)** ... 32 more aug 19, 2015 5:42:23 pm org.apache.tomcat.util.descriptor.web.webxmlparser parsewebxml severe: parse error in application web.xml file @ file:/d:/app_name/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/bea_ws/web-inf/web.xml org.xml.sax.saxparseexception; systemid: file:/d:/app_name/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/bea_ws/web-inf/web.xml; linenumber: 49; columnnumber: 21; error @ (49, 21) : servlets named [axisservlet] , [cxf] both mapped url-pattern [/services/*] not permitted caused by: java.lang.illegalargumentexception: servlets named [axisservlet] , [cxf] both mapped url-pattern [/services/*] not permitted @ org.apache.tomcat.util.descriptor.web.webxml.addservletmapping(webxml.java:308) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.apache.tomcat.util.introspectionutils.callmethodn(introspectionutils.java:379) @ org.apache.tomcat.util.descriptor.web.callmethodmultirule.end(webruleset.java:1034) @ org.apache.tomcat.util.digester.digester.endelement(digester.java:956) ... 25 more severe: marking application unavailable due previous error(s) -->
since error having 2 mapped servlets [axisservlet] , [cxf], tried comment out 1 in web.xml file (web-inf/web.xml) , deploy , new error :
severe: error configuring application listener of class org.springframework.web.context.contextloaderlistener java.lang.noclassdeffounderror: javax/servlet/servletcontextlistener
i not know if missing thing, please me in regard.
my web.xml follows:
<?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <display-name>bea_ws</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <servlet> <display-name>apache-axis servlet</display-name> <servlet-name>axisservlet</servlet-name> <servlet-class>org.apache.axis.transport.http.axisservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>axisservlet</servlet-name> <url-pattern>/servlet/axisservlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>axisservlet</servlet-name> <url-pattern>*.jws</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>axisservlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <servlet> <display-name>axis admin servlet</display-name> <servlet-name>adminservlet</servlet-name> <servlet-class>org.apache.axis.transport.http.adminservlet</servlet-class> <load-on-startup>100</load-on-startup> </servlet> <servlet-mapping> <servlet-name>adminservlet</servlet-name> <url-pattern>/servlet/adminservlet</url-pattern> </servlet-mapping> <servlet> <description>apache cxf endpoint</description> <display-name>cxf</display-name> <servlet-name>cxf</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.cxfservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cxf</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <session-config> <session-timeout>60</session-timeout> </session-config> <context-param> <param-name>contextconfiglocation</param-name> <param-value>web-inf/cxf-beans.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class>
servlet adminservlet
has path covered servlet axisservlet
, need change path adminservlet
else such /_admin_servlet
the second error getting because of library initialization, i'm not spring expert neither fan. check if dependencies set stuffs, library a
dependence on lib b
, b
missed, , exception loading lib a
the practice make container isolated/dedicated 1 particular business/project if can, , place libraries required under library-specified folder(lib
of times)
Comments
Post a Comment