ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 解决 struts2 in tomcat5.0 Error filterstart 问题

解决 struts2 in tomcat5.0 Error filterstart 问题

原创 Linux操作系统 作者:mscpx 时间:2009-07-14 18:33:09 0 删除 编辑

struts2 在 tomcat5.0下出现以下错误,而在tomcat5.5下则正常运行。

2008-8-1 11:19:56 org.apache.catalina.core.StandardHostDeployer install 
信息: Installing web application at context path /struts2Test from URL file:D:\Tomcat 5.0\webapps\struts2Test
2008-8-1 11:20:05 org.apache.catalina.core.StandardContext start 
严重: Error filterStart 
2008-8-1 11:20:05 org.apache.catalina.core.StandardContext start 
严重: Context startup failed due to previous errors


由于jdk1.5 与 tomcat5.0之间的关于 TransformerFactoryImpl 类的冲突造成的。 
tomcat-5.0.28\common\endorsed下有两个jar包:xercesImpl.jar和xml-apis.jar,其中的类 javax.xml.transform.TransformerFactory 与jdk1.5中的类org.apache.xalan.processor.TransformerFactoryImpl其实是同一个类。 
in tomcat java is called with the following argument: 
-Djava.endorsed.dirs="X:\my_app\Portal\tomcat\common\endorsed" 
In this directory you find two jar files: xercesImpl.jar and xml-apis.jar needed by tomcat and that must be loaded before all xmsl stuff present in the jdk (1.4 naming problem). And in the file xml-apis.jar the TransformerFactoryImpl is set to "org.apache.xalan.processor.TransformerFactoryImpl". 

解决办法: 
1. 将xml-apis.jar移出endorsed文件夹。 
2. 用xalan系列jar包替换原来的xercesImpl.jar和xml-apis.jar。 
xalan系列jar包:serializer.jar、xalan.jar、xercesImpl.jar和xml-apis.jar。 
3. For other application, just check this file or dom3-xml-apis.jar in your class path. 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15742414/viewspace-609168/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-06-01

  • 博文量
    36
  • 访问量
    66464