commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Makarand.Sonaw...@lntinfotech.com
Subject Re: Digester throwing Null pointer exception while parsing rule XML
Date Mon, 03 Nov 2003 15:12:01 GMT

Hi,
I was able to generate the detail log for the exception, can any body tell
why its happening
I am again attaching my Rules file and the logs

Regards,
Makarand Sonawane
Insurance SBU
L&T Infotech Limited
Tel - 91-20-5511262 Ext 547

(See attached file: LockBoxRules.xml)(See attached file:
ApacheDigesterSaxFile.log)(See attached file: ApacheDigester.log)



                                                                                         
                           
                      robert burrell donkin                                              
                           
                      <robertburrelldonkin@blueyo        To:       "Jakarta Commons Users
List"                      
                      nder.co.uk>                         <commons-user@jakarta.apache.org>
                         
                                                         cc:                             
                           
                      03/11/2003 03:54 AM                Subject:  Re: Digester throwing Null
pointer exception      
                      Please respond to "Jakarta          while parsing rule XML         
                           
                      Commons Users List"                                                
                           
                                                                                         
                           
                                                                                         
                           




i'm afraid that your xml hasn't made it through but i suspect that you'll
find that your classloader doesn't contain the digester DTD in the
appropriate place. i suspect that you're using subclassing and so the code
will be looking for the DTD amongst your classes rather than in the
digester jar.


having said this, i feel that the existing behaviour could be improved as
follows:

1. rather than an exception being thrown, an error should be logged.
2. if the digester DTD cannot be found in the subclass classloader, then
the FromXmlRuleSet classloader should also be check. this should handle
the case when subclassing is used.

unless anyone comes up with a reason not to make this change, i'll take a
look at adding this tomorrow.

- robert

On Friday, October 31, 2003, at 06:16 AM,
Makarand.Sonawane@lntinfotech.com wrote:

> Hi,
>
>       I am having rule file as attached while parsing the rule file, I am
> getting the  exception
> java.lang.ExceptionInInitializerError:
> org.apache.commons.digester.xmlrules.XmlLoadException: Error at (3, 142:
> null
>       at
> org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances
> (FromXmlRuleSet.java:151)
>       at
> org.apache.commons.digester.Digester.addRuleSet(Digester.java:1663)
>       at
> org.apache.commons.digester.xmlrules.DigesterLoader.createDigester
> (DigesterLoader.java:91)
>       at
>
com.marsh.cansys.accounting.utility.lockbox.bankfileparser.utility.RuleReader.

> digestRuleXML(RuleReader.java:64)
>       at
>
com.marsh.cansys.accounting.utility.lockbox.bankfileparser.utility.RuleReader.

> <clinit>(RuleReader.java:35)
>       at
>
test.junit.AmountNotBalanceTestCase.setUp(AmountNotBalanceTestCase.java:55)
>       at junit.framework.TestCase.runBare(TestCase.java:125)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:386)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
> (RemoteTestRunner.java:270)
>       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
> (RemoteTestRunner.java:161)
>
>
> Regards,
> Makarand Sonawane
> Insurance SBU
> L&T Infotech Limited
> Tel - 91-20-5511262 Ext 547
>
>
> (See attached file: LockBoxRules.xml)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> This email may contain confidential or privileged information for the
> intended recipient(s). If you are not the intended recipient, please do
> not
> use or disseminate the information, notify the sender and delete it from
> your system. Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org






Mime
View raw message