commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baltz, Kenneth" <Kba...@FIRSTAM.COM>
Subject RE: Logging again
Date Sat, 18 Jan 2003 01:05:04 GMT
I agree.  It should throw an exception, or at the very least, indicate
something in the log.  Is there a bug tracking system for Digester?

K.C.

> -----Original Message-----
> From: Howard Miller [mailto:me@howardmiller.co.uk]
> Sent: Friday, January 17, 2003 2:09 PM
> To: commons-user@jakarta.apache.org
> Subject: RE: Logging again
> 
> 
> AAAARRGHHHH!!!!
> 
> found it!
> 
> The second parameter for addBeanPropertySetter had an upper 
> case first letter instead of a lower case. It was presumable 
> generating the wrong setter method name for the bean.
> 
> Why oh why does that not generate an error??? Surely if the rule 
> asks a method to be invoked that doesn't exist then Digester should 
> through an exception. It would certainly have saved me about three 
> hours!!!
> 
> Howard
> 
> On 17 Jan 2003 at 21:58, Howard Miller wrote:
> 
> > Sorry, I made a mistake... I actually get 8 pages of logs! They 
> > actually look good. My document parses with no errors, but the 
> > returned object has no data (all the fields are null). I am 
> cringing 
> > because I know I have done something really stupid - however if you 
> > don't mind...
> > 
> > <?xml version="1.0"?>
> > 
> > <mailer>
> > 	<survey-number>11</survey-number>	
> > 	<database-name>HMTest</database-name>
> > 	<host>mysql.marketingms.com</host>
> > 	<user>mms</user>
> > 	<password></password>
> > 	<state-start>NC</state-start>
> > 	<state-end>NC</state-end>
> > 	<email-field>HMTestSource.Email</email-field>
> > </mailer>
> > 
> > 			Digester digester = new 
> > Digester();
> > 			digester.setValidating( false );
> > 			
> > 			digester.addObjectCreate( 
> > "mailer",Config.class );
> > 			
> > 			digester.addBeanPropertySetter( 
> > "mailer/survey-number", "SurveyNumber");
> > 			digester.addBeanPropertySetter( 
> > "mailer/database-name", "DatabaseName");
> > 			digester.addBeanPropertySetter( 
> > "mailer/host", "Host");
> > 			digester.addBeanPropertySetter( 
> > "mailer/user", "User");
> > 			digester.addBeanPropertySetter( 
> > "mailer/password", "Password");
> > 			digester.addBeanPropertySetter( 
> > "mailer/state-start", "StateStart");
> > 			digester.addBeanPropertySetter( 
> > "mailer/state-end", "StateEnd");
> > 			digester.addBeanPropertySetter( 
> > "mailer/email-field", "EmailField");
> > 			
> > 			File input = new File( filename 
> > );
> > 			config = (Config) 
> > digester.parse( input );
> > 
> > On 17 Jan 2003 at 13:49, Baltz, Kenneth wrote:
> > 
> > > Can you supply your XML and your digester code?  
> > > 
> > > K.C.
> > > 
> > > > -----Original Message-----
> > > > From: Howard Miller [mailto:me@howardmiller.co.uk]
> > > > Sent: Friday, January 17, 2003 1:47 PM
> > > > To: commons-user@jakarta.apache.org
> > > > Subject: Logging again
> > > > 
> > > > 
> > > > Ha! good news and bad.... 
> > > > 
> > > > I got a trace going with the addition of..
> > > > 
> > > > -Dorg.apache.commons.logging.simplelog.defaultlog=trace
> > > > 
> > > > This gives me the output...
> > > > 
> > > > [DEBUG] Digester - -  Fire body() for 
> > > > ObjectCreateRule[className=org.alicats.mailer.Config, 
> > > > attributeName=null]
> > > > [DEBUG] Digester - -  Popping body text ''
> > > > [DEBUG] Digester - -  Fire end() for 
> > > > ObjectCreateRule[className=org.alicats.mailer.Config, 
> > > > attributeName=null]
> > > > [DEBUG] Digester - -[ObjectCreateRule]{mailer} Pop 
> > > > org.alicats.mailer.Config
> > > > [DEBUG] sax - -endDocument()
> > > > 
> > > > This seems to be firing the rules for the opening and closing 
> > > > root tags (<mailer>) and skipping everything else. Why might 
> > > > this happen? Why does it say (atributeName=null)? I have a 
> > > > load of addBeanPropertySetters in there to catch the 
> > > > intermediate elements and they seem to be completely ignored. 
> > > > 
> > > > Stumped!
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:   
> > > > <mailto:commons-user-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail: 
> > > > <mailto:commons-user-help@jakarta.apache.org>
> > > > 
> > > > 
> > > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:commons-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> <mailto:commons-user-help@jakarta.apache.org>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-user-help@jakarta.apache.org>
> 
> 

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