maven packaging 使用 pom 报错

丨平凡丨 发布于 2015/05/25 15:24
阅读 2K+
收藏 0

pom.xml 中使用如下配置可以直接运行

<modelVersion>4.0.0</modelVersion>

<groupId>com.cc</groupId>

<artifactId>Spring4MVCDemo</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Spring4MVCDemo Maven Webapp</name>77

<url>http://maven.apache.org</url>

如果把packaging 修改成  pom 报错

javax.servlet.ServletException: Servlet execution threw an exception
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:172)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:177)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

java.lang.NoSuchMethodError: org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(Ljava/lang/String;Ljava/lang/Class;Ljavax/servlet/jsp/PageContext;Lorg/apache/jasper/runtime/ProtectedFunctionMapper;Z)Ljava/lang/Object;
	org.apache.jsp.WEB_002dINF.views.user.userList_jsp._jspService(userList_jsp.java:83)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:476)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:172)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:177)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

请大家帮忙看下! 谢谢!

加载中
返回顶部
顶部