1. 程式人生 > >spring+axis2奇葩問題吐槽

spring+axis2奇葩問題吐槽

首先。貼個異常:

HTTP Status 500 - File "/axis2-web/listSingleService.jsp" not found


type Exception report

message File "/axis2-web/listSingleService.jsp" not found

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: File "/axis2-web/listSingleService.jsp" not found
	org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:119)
	org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:200)
	org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
	org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
	org.springframework.security.config.debug.DebugFilter.invokeWithWrappedRequest(DebugFilter.java:69)
	org.springframework.security.config.debug.DebugFilter.doFilter(DebugFilter.java:58)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
噁心吧!

無非就是servcies.xml裡找不到你要請求的webservcies名稱而已。


好咱們來分析問題

1.servcies.xml是否配置正確的<service name="serviceName"> 名稱  --->不知道在哪是吧,檢視我的另一篇文章spring+axis2整合釋出wsdl去

2.確定請求http://localhost:8080/project/services/serviceName?wsdl 一致了。OK ,請檢視application*.xml檔案中是否有注入這麼一段話:

<!-- 配置axis2交給spring管理,該配置必須存在 -->

<bean id="applicationContext"
class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />

3.第二步也OK了。異常如舊。不知道咋搞了吧。。哈哈...... 

接下里就是考驗的時候了。反正我這次碰到的奇葩問題就是:

    services方法的引數bean中的其中一個屬性未給get-set方法。

總之碰到問題要淡定,一點點的去查,心態好了,什麼都好搞定。做個記錄!