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(Digester.java:3181)
   3:     at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
   4:     at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
   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(Digester.java:1827)

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

CAPTCHA Image
Refresh Image
*