On Fri, 28 Mar 2003, Durham David Cntr 805CSS/SCBE wrote:
> Date: Fri, 28 Mar 2003 08:22:10 -0600 > From: Durham David Cntr 805CSS/SCBE <[EMAIL PROTECTED]> > Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]> > To: Jakarta Commons Users List <[EMAIL PROTECTED]> > Subject: RE: [digester] SetNextRule and multiple children > > > -----Original Message----- > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] > > > > > > An InvocationTargetException normally means that the method you told > > Digester to call via reflection (here, the add() method on your > > ActionConstraint class) threw an exception. Is there anything in your > > add() method that might cause this on the second invocation? > > That's makes sense since the root cause was a ClassCastException. ActionConstraint > is an extension of TreeSet and I did not override add(). > > Here's the root cause: > > Caused by: java.lang.ClassCastException: mil.usaf.rad.dpart.struts.Group > at java.util.TreeMap.compare(TreeMap.java:1081) > at java.util.TreeMap.put(TreeMap.java:459) > at java.util.TreeSet.add(TreeSet.java:205) > > > Does this mean that Group needs to implement Comparable? > Yes, unless you supply your own Comparator to the constructor. > > I solved my problem by changing ActionConstraint to extend HashSet. > That's another way to fix it. > > > > Craig > > > > Dave > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
