• Post Reply Bookmark Topic Watch Topic
  • New Topic

xercesImpl.jar causes exceptions?  RSS feed

 
Mingwei Jiang
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using commons digester to map the xml configuration file to java beans. Now in my classpath I have jar files as below:

commons-digester-1.7.jar; commons-collections-2.1.jar; commons-logging-1.0.4.jar; commons-beanutils.jar; log4j1.2.9.jar

For some reasons, I need to add xercesImpl.jar to my classpath also, but after adding it, when I run the original O.K. program, it gives me such exception:




The code on UploadRunner line 17 is:



Removing xercesImpl.jar, everything will back on track.

Please help me to solve this problem. Thanks!
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is most likely a version problem. Carefully check which version of the XML API or Xerces is required for commons-digester, and check which version of Xerces you are using / need for the rest of your application.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put first Xercesimpl.jar & secondly Xerces.jar (sequence important)in a classpath...mostly your problem will be solved...

I was facing same problem in another stuff solved with the same trick.

Shrinivas
 
Mingwei Jiang
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, guys!

I found the problem. It was due to the version of JDK and XercesImpl.jar. If you are using xercesImpl.jar 2.7.1, you must use JDK 1.5, or it will give you such exception, because JDK 1.4 and below don't have the class xercesImpl 2.7.1 requires.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!