---
title: "tomcat启动报错(2)"
author: "smartwgd"
date: "2009-12-16T21:25:35Z"
tags: []
categories: ["企业架构"]
slug: "tomcat-2"
draft: false
lastmod: "2009-12-16T21:25:35Z"
id: 550083
url: "https://smartwgd.iteye.com/blog/550083"
---

tomcat 5.0.28  +jdk1.6+eclipse

 

启动struts2的那个blank包 报错。

 

 

查看tomcat/logs里面 看到javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

 

 

然后上网搜了一下，发现只要把tomcat\\common\\endorsed\\的包xml-apis.jar注掉就好了。例如改名字为xml-apis.jar.1

 

原理：

错误原因：

认为是由于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".