Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#10 Can't load config file via system classloader on a server

open
nobody
None
5
2008-07-25
2008-07-25
Fabian Steeg
No

When using the tool embedded in a web service running on a JBoss application server, obtaining a Config instance fails (Config.getInstance().getConfiguration(...)) as the system classloader which is used in the Config class can't load the config file. Some research on the web reveals that the same seems to be true for servlets.

Using the classloader obtained via this.getClass().getClassLoader() inside Config works fine. I've attached a patch created in Eclipse (three changes in Config.java).

Discussion