Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
24 July 2005 @ 11pm

Tagged
Ajax, Java

Discuss

DWR, Tomcat 5.5, and Xalan classpath error

If you get errors attemtping to use DWR with Tomcat 5.5+ with a stack trace similiar to:

342192658 [http-8080-Processor3] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Ajax] - StandardWrapper.Throwable
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)

It is due to an issue with the xml-apis.jar that Tomcat includes in the common/endorsed directory (which is also in the tomcat classpath by default). This jar conflicts with the javax call attempted seen in the stack trace. I renamed xml-apis.jar to .bak and restarted, which solved the problem, but you could probably also just remove /common/endorsed from the startup script. I’m not sure if Tomcat needs either of the jars in this folder for its own work, but so far things seem to work fine.


9 Comments

Posted by
Himanshu Joshi
29 September 2005 @ 9am

Thanx………..!


Posted by
kooer
25 November 2005 @ 2am

thanks!!


[...] 今天我基本上是�了java xml的东西了,informa跑的好好的,一上resin就��,�了几个resin的版本还是没有�定。于是往tomcat上走,tomcat的�置俺�太熟悉了,就先暂时��标准web目录结构,上�kao,还�行。上网查查。。还好。。有一个说法,这哥们虽然解决了,但是�能肯定个原因。 [...]


Posted by
Alexander
31 January 2006 @ 2am

If you are have no access to Tomcat directories just add xalan jar to your compilation: http://xml.apache.org/xalan-j/


[...] �考文献: DWR, Tomcat 5.5, and Xalan classpath error [...]


Posted by
Jarvis
18 May 2006 @ 7am

Great info. Thanks!


Posted by
FitzChivalry
29 June 2006 @ 10am

Thanks! That did the trick…


Posted by
DivCésar
14 July 2006 @ 7am

Really, Thanks!!!!!!!!!


Posted by
Enzo Michelangeli
11 July 2007 @ 7am

Even better, remove the package altogether:

yum remove xml-commons-apis

It has no dependencies declared. HOWEVER, (re)starting Tomcat will elicit whinings:

[root@tardis dnld]# /etc/init.d/tomcat5 restart
Stopping tomcat5: [ OK ]
Starting tomcat5: /usr/bin/rebuild-jar-repository: error: Could not find xml-commons-apis Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm
[ OK ]

Don’t be moved: so far I haven’t seen any adverse effect — and Xalan is back!

BTW, my case was unrelated to DWR: I was running Nutch on RHEL5 and the Sun jdk1.6.0_02 .


Leave a Comment

Google Maps offers “hyrbid” mode w/ satellite + maps The new(er) Rails movie is very impressive