https://stackoverflow.com/q/44429083/4522875
Static initialization failed for Saxhelper /** * Creates a new SAX XMLReader, with sensible defaults */ public static synchronized XMLReader newXMLReader() throws SAXException, ParserConfigurationException { XMLReader xmlReader = saxFactory.newSAXParser().getXMLReader(); xmlReader.setEntityResolver(IGNORING_ENTITY_RESOLVER); trySetSAXFeature(xmlReader, XMLConstants.FEATURE_SECURE_PROCESSING); trySetXercesSecurityManager(xmlReader); return xmlReader; } cause : java.lang.NoClassDefFoundError: org/apache/poi/util/SAXHelpernull Caused by: java.lang.ClassNotFoundException: org.apache.poi.util.SAXHelpernull [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at java.net.URLClassLoader.findClass(URLClassLoader.java:434)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:230)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java:682)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:123)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java:665)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:566)null [6/12/17 9:52:13:904 IST] 00000077 SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java:665)null
Sounds very much like a local classpath issue, nothing that we can fix in POI unless you can provide an isolated unit test which still shows the problem. Please test your code outside any web-container to check if that is related. Also the exact version of JVM that you are using might help.
And based on the SO question-comments this is very likely related to Eclipse framework, so what would you expect us to do here?
See NoClassDefFoundError in https://poi.apache.org/faq.html
I added extra logging to SAXHelper in https://github.com/apache/poi/pull/58 Maybe that might help to show if its the static initializer.
(In reply to PJ Fanning from comment #5) > I added extra logging to SAXHelper in https://github.com/apache/poi/pull/58 > Maybe that might help to show if its the static initializer. Thanks for the suggestion. Added in r1798792 and r1798793.
Closing this for now as I don't see anything more that we can do here. We have improved logging in trunk which you can use to get some more details, but overall it seems the problem lies elsewhere related to class loading in your specific environment.