users@glassfish.java.net

Warning, touchin the logging properties may trash the GF installation

From: <forums_at_java.net>
Date: Mon, 8 Aug 2011 13:11:05 -0500 (CDT)

This is the third Glassfish installation that crashes and remains unsuable
after changing the logging properties using the web console.

In this case (3.1.1 as the other 2 were on 3.1), I have the possible cause
identified. It seems that after changing the logging level for several
properties (all the ones that were related to JSF, to debug some IU problems
I had), the logging.properties file gets corrupted.

It was working fine until I closed the machine for the day. Today Monday the
GF instance will not start with the exception copied below. It is clear the
problem is at logging, so I checked the logging.properties file (as I cannot
do it using the console), and found out only the log level setting properties
were there. There are many other properties like
handlers=java.util.logging.ConsoleHandler or
com.sun.enterprise.server.logging.GFFileHandler.file that should be there,
and they are missing!  After copying the logging.properties file from
another instalation, the server was able to start again. That could be a bug
in the console when saving the file after a  modificaction, in any case I
suggest to keep a copy of the logging.properties incase you need to change
any logging level.

Launching GlassFish on Felix platform
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.NullPointerException
    at
com.sun.enterprise.server.logging.GFFileHandler.postConstruct(GFFileHandler.java:159)
    at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
    at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
    at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
    at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
    at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
    at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
    at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:701)
    at java.util.AbstractList$Itr.next(AbstractList.java:345)
    at
com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:374)
    at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
    at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
    at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
    at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
    at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
    at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
    at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:229)
    at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
    at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at
com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    ... 6 more
Completed shutdown of GlassFish runtime

William Martinez.


--
[Message sent by forum member 'wmartinez']
View Post: http://forums.java.net/node/830831