Has anyone else had a problem with accessing resouces in a jar within a J2EE framework on a Borland AppServer?
We are using this code, but the URL returned is NULL...
In QueryBean
public class QueryBean ... {
static private final Category category = Logging.getCategory(...);
}
In Logging.getCategory():
public static getCategory() {
...
Configuration.getProperty("bla");
}
Configuration:
public class Configuration {
static private final Properties PROPERTIES = VscProperties.create(Configuration.class);
...
}
Finally, in VscProperties.create():
VscProperties create(Class yourClass) {
// Generate the properties filename
URL theURL = yourClass.getClassLoader().getResource(yourClass, "name");
// ERROR: URL is NULL!!!
}
"yourClass" is Configuration.class, which is accessed though an EJB, with an indirect call through another class, Logging. The property file is in the EJB jar, like all other classes, but the URL for it is always null. The same code works fine in a non-EJB environment (WebApp, Java App.).