[
http://issues.apache.org/jira/browse/DIGESTER-109?page=comments#action_12444087
]
Anna Komaristaia commented on DIGESTER-109:
-------------------------------------------
Hi Simon, Niall and Henri,
Sorry for not respond quickly.
Please note that 2 exceptions are not coming together.
This is the printout related to FromXmlRuleSet exception:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:163)
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:140)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1776)
at
org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:79)
at
org.apache.commons.validator.ValidatorResources.initDigester(ValidatorResources.java:206)
at
org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:153)
at
org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:133)
Once "FromXmlRuleSet" class was changed (URL dtdURL =
getClass().getClassLoader().getResource(DIGESTER_DTD_PATH);)
we can see the next exception from "SetNextRule" class:
java.lang.NullPointerException
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:203)
at org.apache.commons.digester.Rule.end(Rule.java:230)
at org.apache.commons.digester.Digester.endElement(Digester.java:1130)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1666)
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet$URLXMLRulesLoader.loadRules(FromXmlRuleSet.java:197)
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:176)
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:140)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1776)
at
org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:79)
at
org.apache.commons.validator.ValidatorResources.initDigester(ValidatorResources.java:206)
at
org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:153)
at
org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:133)
Thank you for your help,
//Anna
> FromXmlRuleSet and SetNextRule classloader issue
> ---------------------------------------------------
>
> Key: DIGESTER-109
> URL: http://issues.apache.org/jira/browse/DIGESTER-109
> Project: Commons Digester
> Issue Type: Bug
> Reporter: Anna Komaristaia
>
> When I start the application in Unix, there are 2 classes cause the problem:
> 1) The NullPointerException in "FromXmlRuleSet " class in the method
> "addRuleInstances(Digester, String)";
> 2) The NullPointerException in "SetNextRule" class in the method "end()";
> Temporary solution
> ---------------------------
> I recompiled the commons-digester jar with the next changes and it's working
> fine in PC and Unix:
> Changes in the "FromXmlRuleSet " class
>
> 1) public static final String DIGESTER_DTD_PATH = "digester-rules.dtd";
> 2) in the method "addRuleInstances"
> the line
> URL dtdURL =
> getClass().getClassLoader().getResource(DIGESTER_DTD_PATH);
>
> changed by
>
> URL dtdURL = this.getClass().getResource(DIGESTER_DTD_PATH);
> Changes In the "SetNextRule" class
> the line
> paramTypes[0] = digester.getClassLoader().loadClass(
> paramType);
> changed by
> if( digester.getClassLoader() == null )
> paramTypes[0] = Class.forName(paramType);
> else
> paramTypes[0] = digester.getClassLoader().loadClass(
> paramType);
> Thanks,
> //Anna
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]