javax.xml.transform.TransformerFactoryConfigurationError

环境:JDK1.5 , TOMCAT5.0_29
今天在运行OrderlyCalls时启动Tomcat时提示:
严重: Error listenerStart
访问页面时报404错误;
于是查看Tomcat的log文件,查看出错信息如下:
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
解决办法:

1,在那个包错的类前部加上 System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");

2,换成JDK1.4(该项目不行);
注:不过为什么要这么处理的话,我也还没有弄清楚,希望有清楚的朋友留言赐教,谢谢!
错误原因: 认为是由于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.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值