Gotcha: JUnit tests fail on Eclipse with a mysterious Xerces error
I had a strange problem occurring with some JUnit tests
java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementImpl.getTextContent()Ljava/lang/String;
at com.whirlycott.cache.CacheManager.configure(Unknown Source)
at com.whirlycott.cache.CacheManager.(Unknown Source)
at com.whirlycott.cache.CacheManager.(Unknown Source)
…
Turns out that if you have Commons Configuration specified in your Maven POM, you’ll get this error. You need to specify this in pom.xml:
… and specify xercesImpl 2.6.2 as a dependency. Things will work again.
