Philip Jacob

Gotcha: JUnit tests fail on Eclipse with a mysterious Xerces error

· Philip Jacob

Note to archeologists and readers: this was written a long time ago and is maintained simply for historical reasons.

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:




commons-configuration
commons-configuration
1.1
compile


xerces
xerces


 **[augmentation implants breast gummy bear](http://www.cccmz.de/wp-content/uploads/2006/08/breast-augmentation-gummy-bear-implants.html)** 

… and specify xercesImpl 2.6.2 as a dependency. Things will work again.