users@glassfish.java.net

Re: log4j configured app fails in glassfish v4

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Jan 2010 00:31:48 PST

Further evidence, when turning up the logging levels in GFv3, I saw this Hibernate error come through the logs:

FINE: Not setting field logger to null in object of class org.slf4j.impl.Log4jLoggerAdapter because the referenced object was of type org.apache.log4j.Logger which was not loaded by this WebappClassLoader.
FINE: Could not set field log to null in class org.hibernate.search.store.FSDirectoryProvider
java.lang.ExceptionInInitializerError
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
        at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
        at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
        at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
        at java.lang.reflect.Field.get(Field.java:358)
        at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1841)
        at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1670)
        at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1639)
        at org.glassfish.internal.data.ApplicationInfo.unload(ApplicationInfo.java:280)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:760)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:790)
        at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:184)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at org.glassfish.deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:414)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:210)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:86)
        at org.hibernate.search.util.LoggerFactory.make(LoggerFactory.java:31)
        at org.hibernate.search.store.FSDirectoryProvider.<clinit>(FSDirectoryProvider.java:32)
        ... 46 more
[Message sent by forum member 'rwillie6' (ryanwilson.m_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=381908