commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esteban Lorenzano <esteba...@yahoo.com>
Subject Digester: Problems with ClassLoader
Date Tue, 30 Sep 2003 14:36:58 GMT
I am working with Digester inside an Application
Server (Oracle iAS), and I had some problems because
the method
DigesterRuleParser.IncludeRule.includeXMLRules, uses
the ClassLoader for the class DigesterRuleParser, not
the ClassLoader in use for the current thread (as this
is a container, is not the same ClassLoader for the
system jars and the application jars).
So, I just replace the line 368 of the file
DigesterRuleParser.java:
URL fileURL =
DigesterRuleParser.this.getClass().getClassLoader().getResource(fileName);

with the line:

URL fileURL =
Thread.currentThread().getContextClassLoader().getResource(fileName);

I think this can be useful, and my tests works fine,
maybe somebody wants to add this code to the
repository



=====
****************************************
* ˇ Retroceder nunca, rendirse jamás ! *
****************************************

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

Mime
View raw message