users@glassfish.java.net

Re: Embedding Glassfish in Apache Karaf

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Fri, 03 Feb 2012 12:04:46 +0530

Just found a work around to the logging issue (thanks to debugger). Just
add the following property to karaf/etc/java.util.logging.file:

com.sun.enterprise.server.logging.GFFileHandler.file=/path/to/glassfish/domains/domain1/logs/server.log

This is not enought because pax-logger seems to be resetting JDK logger,
so to disable this functionality of pax-logger, you need to add the
following in karaf/etc/custom.properties:

org.ops4j.pax.logging.skipJUL=true

After doing this, the logging NPE goes away. The admin console comes up,
but it is asking for a password when it should not. I will let that
handled by the admin console team. They are copied here.

Thanks,
Sahoo


On Friday 03 February 2012 11:37 AM, Sahoo wrote:
>
> Now the next problem about logging. I noticed that because of the way
> GFFileHandler is written, it gets NPE when manager.getProperty()
> returns null. I have included Naman, who handles logging to help you
> get past this problem.
>
> / LogManager manager = LogManager.getLogManager();
> String cname = getClass().getName();
> String filename =
> TranslatedConfigView.getTranslatedValue(manager.getProperty(cname +
> ".file")).toString();/