org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java

jdk1.5,struts2.3.4,tomcat6.0 配置struts2 报错500:

web.xml


<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
	"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
 <include file="struts-default.xml"/>
</struts>
 

    没有写其他任何java类,直接启动报错:

HTTP Status 500 -


type Exception report

message

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

exception

java.lang.NullPointerException
	org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
	com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
	org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
	org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
	com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:501)
	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.

 

 

我报错的原因是:由于tomcat 的路径有空格造成的,查询了下是struts2 的一个bug.当然其他原因也会引起,但是这个原因让我解决的半天。。。

1.我将Apache tomcat v6.0  改成tomcat6.0 去掉空格就行了。

2. 我在给我server name 取名的时候也是将默认的空格去掉。两个都去掉才行。

有这错误的同学可以参考下

猜你喜欢

转载自greemranqq.iteye.com/blog/1688003