webservice出異常provider org.apache.xalan.processor.T

剛學習web service按照myeclipse的幫助文檔配置,出現標題異常,經過網上得查詢得知原因。

 

錯誤原因:
認爲是由於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.4的JDK和tomcat5.0
或者JDK1.5 tomcat5.5 這2種類型纔是匹配的

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章