RSS Feed for This PostCurrent Article

Java: Debug Commons Digester Exception

This is a exception produced by Commons Digester. After spending few hours to find out the root cause, including studying the source code, I found that I make a silly mistake.

   1: java.lang.NullPointerException
   2:     at org.apache.commons.digester.Digester.createSAXException(
   3:     at org.apache.commons.digester.Digester.createSAXException(
   4:     at org.apache.commons.digester.Digester.startElement(
   5:     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
   6:     at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
   7:     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
   8:     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
   9:     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  10:     at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  11:     at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  12:     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  13:     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  14:     at org.apache.commons.digester.Digester.parse(

One thing to take note is that whenever you have error with any of the commons libraries, do remember to turn on the debugging mode.

   1: <logger name="org.apache" additivity="true">
   2:       <level value="DEBUG"/>
   3: </logger>

And it helps a lot for troubleshooting.

Trackback URL

RSS Feed for This PostPost a Comment

Refresh Image