dev@glassfish.java.net

Re: v3 grizzly: missing resource bundle ?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Tue, 02 Sep 2008 17:31:22 -0700

On 09/ 2/08 05:21 PM, Jan Luehe wrote:
> Hi Carla,
>
> have you already made the changes where you pass in the caller's class
> object
> to LogDomains.getLogger()?
>
> This will determine where (in which module) the LogStrings.properties for
> core/kernel should reside.
>
> Once you tell me, I can make the change.

... or you can apply the attached diffs yourself.

Depending on which classloader is used (by your changes) to load the
requested
LogStrings.properties, create an (empty for now)

  com/sun/logging/enterprise/system/core/services/LogStrings.properties

in either common/common-util or core/kernel.


Jan


>
> Thanks,
>
> Jan
>
> On 09/ 2/08 03:50 PM, Jerome Dochez wrote:
>> JFA
>>
>> The class is in kernel yet is trying to load the logger from the web
>> bundle.. looks like we need to move those resources and create a new
>> LocalStrings.properties inside kernel with those strings
>>
>> what do you think ?
>>
>> Jerome
>>
>>
>> On Sep 2, 2008, at 3:06 PM, Carla Mott wrote:
>>
>>>
>>> Hi all,
>>>
>>> I'm in the process of changing the code related to logging in v3 to
>>> correctly pickup the resouce bundles when logging messages. I
>>> needed to change some 280+ files because of an API change and am in
>>> the process of testing.
>>>
>>> Looks like there is a missing bundle for grizzly (?). I'm not sure
>>> where to look to start debugging this and I'm hoping that someone
>>> from the webtier team can point me in the right direction. Any help
>>> is appreciated.
>>>
>>> Thanks,
>>> Carla
>>>
>>> Here is the part of the stack trace that I get when I start v3:
>>>
>>>
>>> [#|2008-09-02T14:19:26.007-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|Exception
>>> in thread "GlassFish Kernel Main Thread" |#]
>>>
>>> [#|2008-09-02T14:19:26.008-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|java.lang.ExceptionInInitializerError|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.configureGrizzly(GrizzlyProxy.java:139)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyProxy.<init>(GrizzlyProxy.java:127)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:261)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:204)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.009-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.010-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)|#]
>>>
>>> [#|2008-09-02T14:19:26.011-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.012-0700|INFO||org.jvnet.hk2.osgiadapter|_ThreadID=14;_ThreadName=Thread-4;org.glassfish.common.container-common
>>> [37];|Started bundle org.glassfish.common.container-common [37]|#]
>>>
>>> [#|2008-09-02T14:19:26.020-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)|#]
>>>
>>> [#|2008-09-02T14:19:26.022-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.023-0700|INFO||org.jvnet.hk2.osgiadapter|_ThreadID=14;_ThreadName=Thread-4;org.glassfish.common.glassfish-naming
>>> [27];|Started bundle org.glassfish.common.glassfish-naming [27]|#]
>>>
>>> [#|2008-09-02T14:19:26.023-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLoaderInjector.postConstruct(ApplicationLoaderInjector.java:52)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.023-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.023-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.024-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)|#]
>>>
>>> [#|2008-09-02T14:19:26.025-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.026-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)|#]
>>>
>>> [#|2008-09-02T14:19:26.026-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.026-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:168)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.027-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.server.AppServerStartup$1.run(AppServerStartup.java:103)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.027-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|Caused
>>> by: java.util.MissingResourceException: Can't find bundle for base
>>> name javax.enterprise.system.container.web, locale en_US|#]
>>>
>>> [#|2008-09-02T14:19:26.027-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.028-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)|#]
>>>
>>> [#|2008-09-02T14:19:26.028-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)|#]
>>>
>>> [#|2008-09-02T14:19:26.028-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.logging.LogDomains$1.getResourceBundle(LogDomains.java:251)|#]
>>>
>>> [#|2008-09-02T14:19:26.029-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> at
>>> com.sun.enterprise.v3.services.impl.GrizzlyListenerConfigurator.<clinit>(GrizzlyListenerConfigurator.java:72)|#]
>>>
>>>
>>> [#|2008-09-02T14:19:26.029-0700|SEVERE||null|_ThreadID=12;_ThreadName=Thread-4;|
>>> ... 19 more|#]
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>



Index: core/kernel/src/main/java/com/sun/enterprise/v3/services/impl/GrizzlyListenerConfigurator.java
===================================================================
--- core/kernel/src/main/java/com/sun/enterprise/v3/services/impl/GrizzlyListenerConfigurator.java (revision 22250)
+++ core/kernel/src/main/java/com/sun/enterprise/v3/services/impl/GrizzlyListenerConfigurator.java (working copy)
@@ -64,7 +64,7 @@
      * The logger to use for logging ALL web container related messages.
      */
     protected static final Logger logger = LogDomains.getLogger(
- LogDomains.WEB_LOGGER);
+ LogDomains.SERVICES_LOGGER);
     
     /**
      * The resource bundle containing the message strings for logger.
Index: common/common-util/src/main/java/com/sun/logging/LogDomains.java
===================================================================
--- common/common-util/src/main/java/com/sun/logging/LogDomains.java (revision 22302)
+++ common/common-util/src/main/java/com/sun/logging/LogDomains.java (working copy)
@@ -209,7 +209,10 @@
     /** AMX Logger */
     public static final String AMX_LOGGER = DOMAIN_ROOT +"enterprise.system.AMX";
 
+ /** core/kernel Logger */
+ public static final String SERVICES_LOGGER = DOMAIN_ROOT + "enterprise.system.core.services";
 
+
     /**
      * This is temporary and needed so that IAS can run with or without
      * the com.sun.enterprise.server.logging.ServerLogger. The subclassed