views:

9

answers:

1

Hello

I have dropped a war into the autodeploy of a Glassfish 3 domain and it has exploded fine, showing a subdirectory tree domain1>applications>myApp under which is a WEB-INF>classes>myApp folder tree which stores the classes for myApp.

The app deploys, but I've got this problem about Log4J:

[#|2010-10-14T16:18:04.433+0100|SEVERE|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=Thread-1;|log4j:WARN No appenders could be found for logger (org.ajax4jsf.renderkit.ChameleonRenderKitFactory).|#]

[#|2010-10-14T16:18:04.433+0100|SEVERE|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=Thread-1;|log4j:WARN Please initialize the log4j system properly.|#]

My app is organised with properties files in the same folder as the application classes. In the bean which sets up Log4J I load the properties with

PropertyConfigurator.configure(MyApp.class.getClassLoader().getResource("log4j.properties").getPath().replaceAll("%20", " "));

Is this code directly to blame for the error? I wasn't expecting this error on deployment, but at runtime.

A: 

I've just seen there was a problem with the war and the contained properties file at the time I wrote the post. The properties file is now included and errors abate.

Mark Lewis