Reply to comment

GROOVY Console java.lang.NoClassDefFoundError: org/apache/xerces/parsers/AbstractSAXParser

I installed the Groovy Console.  It's a pretty nifty and easy way to quickly run some java that you need to quickly iterate through the write/test/fix cycle.

I was trying to parse some html into xml, and I got the following error:

java.lang.NoClassDefFoundError: org/apache/xerces/parsers/AbstractSAXParser

I tried adding 3 different versions of xercesImpl to my Groovy Console classpath, to no avail.  While adding to the groovy classpath worked for some jars (i.e. commons-io), it did not work for the xercesImpl jar.

In the end, I copied the xercesImpl.jar (version 2.8.1) into the lib directory of my groovy console application.  This fixed the error.  This location (for me) was C:\Program Files\Groovy\Groovy-1.7.1\lib

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options