struts2环境配置碰到的问题

环境:

1、MyEclipse5.1(Eclipse3.2)

2、Struts2_2.0.11

3、Tomcat5.0

 

异常:

 

2009-01-10 15:40:39 StandardContext[/struts2]Exception starting filter struts2
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

错误原因:

jdk1.5和tomcat5.0之间关于TransformerFactoryImpl类的命名冲突造成。

在tomcat安装目录的common\endorsed下有两个jar包,xercesImpl.jar和xml-apis.jar,其中xml-apis.jar中的

类javax.xml.transform.TransformerFactory与jdk1.5中的类org.apache.xalan.processor.TransferFactoryImpl其实是同一个类。

 

解决:

1、升级tomcat到5.5或更高版本。

2、下载xalan系列jar包。(http://apache.etoak.com/xml/xalan-j/source/)

(xml-apis.jar、xercesImpl.jar、xalan.jar、serializer.jar)

     替换endorsed文件夹中的两个jar包。

 

 

你可能感兴趣的:(apache,tomcat,xml,J#)