commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Benn <>
Subject [digester] Reading in Enums
Date Wed, 04 Jul 2012 19:30:24 GMT

  I have a class which holds a set of enums; I'm writing out to the xml
file the name of the enum and I want to read it back in with Digester.
 However I'm having a hard time working out how to do that - has anyone
managed to read in the enums.  I'm currently trying:

Digester digester = new Digester();
digester.addObjectCreate("barcodeScanner", BarcodeScannerModel.class);
"addPossibleOneDBarcodeFormat", 1);
digester.addCallParam("barcodeScanner/formats/OneDBarcodeFormat", 0,

  This however returns the error message of : org.xml.sax.SAXParseException; lineNumber: 4;
columnNumber: 39; Error at line 4 char 39: No such accessible method:
addPossibleOneDBarcodeFormat() on object:

  The method is question is:

public void addPossibleOneDBarcodeFormat(OneDBarcodeFormat format){

  The method is there so I guess it is just the parameter that is the
problem in that Digester is trying to pass a String whereas it needs an
enum.  So, if anyone can help that would be greatly appreciated.





Neil Benn MSc
Ziath Ltd
Phone: +44 (0) 1223 655577

*Please consider the environment before printing this email.*

Follow us on Facebook <>,
LinkedIn <>

IMPORTANT NOTICE: This message, including any attached documents, is
intended only for the use of the individual or entity to which it is
addressed, and may contain information that is privileged, confidential and
exempt from disclosure under applicable law. If the reader of this message
is not the intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify Ziath Ltd immediately by email at Thank you.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message