users@glassfish.java.net

Re: Embedding Glassfish in Apache Karaf

From: <jlgreene2_at_aep.com>
Date: Fri, 3 Feb 2012 07:34:09 -0500

Sahoo,

Thank you very much for your response. Your suggested changes have
remedied all of my issues. Glassfish appears to be running normally now
within Karaf. I will be conducting a good deal of testing with this
configuration over the next few weeks. If you're interested, I'd be happy
to share my results.

Jim Greene
IT Architect-Principal, Enterprise Architecture and Strategy
American Electric Power
One Riverside Plaza, 11th Floor
Columbus, OH 43215
Office: 614.716.2617 - Audinet: 8.200.2617
Email: jlgreene2_at_aep.com



From: Sahoo <sanjeeb.sahoo_at_oracle.com>
To: sanjeeb.sahoo_at_oracle.com
Cc: users_at_glassfish.java.net, jlgreene2_at_aep.com, Naman Mehta
<naman.mehta_at_oracle.com>, "LAM,ANISSA" <anissa.lam_at_oracle.com>
Date: 02/03/2012 01:34 AM
Subject: Re: Embedding Glassfish in Apache Karaf



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();