eclipse中启动TomCat后出现java.lang.reflect.InvocationTargetException

2014-10-18 15:01:26 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.6.0_10\bin;F:\Tomcat 6.0\bin
2014-10-18 15:01:26 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2014-10-18 15:01:26 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 671 ms
2014-10-18 15:01:26 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2014-10-18 15:01:26 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.10
2014-10-18 15:01:27 org.apache.tomcat.util.digester.Digester endElement
严重: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:930)
at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:760)
at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)
..........

一、 在{TOMCAT_HOMT}/conf/web.xml打开下列两项的注释
1、
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
2、
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
并将1项中的<load-on-startup>2</load-on-startup>去掉
二、修改{TOMCAT_HOME}/conf/context.xml
将<Context> 修改为<Context privileged="true">
三、在eclipse3.3中的Servers 项目中找到配置文件server.xml中 在描述项目的Host标签中添加属性 privileged="true"
温馨提示:内容为网友见解,仅供参考
第1个回答  2014-10-19
Apache Tomcat本地库,在生产环境中不存在java.library。路径:D:\ Java \ jdk1.6.0_10 \ bin \程序文件;F:\ Tomcat 6.0 \ bin

配置环境变量
第2个回答  2014-10-18
应该是有antlr.jar有多个,删除掉低版本的本回答被网友采纳
第3个回答  2014-10-18
最简单的方法换一个TomCat,重新安装。
第4个回答  2014-10-18
对象不存在或类加载不对。
相似回答