Thursday, December 13, 2012

how to fix groovy console warnings

Was getting these annoying messages repeatedly in groovysh and groovyConsole:


java.util.prefs.BackingStoreException: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory



Solution: delete xml-apis and xercesImpl jars from your ~/.groovy/lib directory:


enkomion [15:20:56] ~/.groovy/lib $ rm xml-apis-1.4.01.jar
enkomion [15:20:59] ~/.groovy/lib $ rm xercesImpl-2.10.0.jar




No comments: