commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Digester frustrations
Date Tue, 22 Mar 2005 20:43:22 GMT
Hey all... I'm trying to use Digester myself for the first time and I'm
getting very frustrated...  Here's what I have:

Digester digester = new Digester();
// I get InputStream isConfigFile here, I have verified I have it by
printing out the contents
configData = (ConfigData)digester.parse(isConfigFile);

configData is a static member of the class this code belongs to. 
ConfigData is a inner class.  Here's the relevant snippet:

private int mondayStartTime;
private int mondayEndTime;
public void setMondayStartTime(String mondayStartTime) {
  this.mondayStartTime = Integer.parseInt(mondayStartTime);
public int getMondayStartTime() {
  return mondayStartTime;

As you can probably guess, I have the same things for every day of the
week.  Lastly, here's the XML file:

<?xml version="1.0" encoding="UTF-8"?>

The problem is that it gets all the way to the line:

configData.setConfigDataSet(); exceptions are thrown, no messages from Digester, etc.  But, that
line causes a NullPointerException, so I can only assume that means
Digester did not create the object and/or could not populate it properly
so returned null (or ate an exception and didn't report it?)

Anyone spot a problem here?  I'm getting ready to throw myself out a
window.  Thanks all!

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message