logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1051) NoClassDefFoundError when starting app on Google App Engine
Date Wed, 14 Sep 2016 06:20:22 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15489566#comment-15489566
] 

Lukasz Lenart commented on LOG4J2-1051:
---------------------------------------

I'm again seeing the same problem in logs when using Log4j2 2.6.2 - what can be wrong?

{noformat}
2016-09-14 08:18:30,908 main ERROR Unable to create Lookup for jvmrunargs java.lang.IllegalArgumentException:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.lookup.JmxRuntimeInputArgumentsLookup
	at org.apache.logging.log4j.core.util.ReflectionUtil.instantiate(ReflectionUtil.java:192)
	at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:66)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:467)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:219)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:231)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:496)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:566)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:582)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:217)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
	at org.apache.struts2.tiles.StrutsTilesListener.<clinit>(StrutsTilesListener.java:34)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at java.lang.Class.newInstance(Class.java:374)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
	at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:271)
	at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
	at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
	at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
	at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
	at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:258)
	at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
	at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213)
	at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
	at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
	at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
	at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:225)
	at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:216)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.lookup.JmxRuntimeInputArgumentsLookup
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:142)
	at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:150)
	at org.apache.logging.log4j.core.util.ReflectionUtil.instantiate(ReflectionUtil.java:188)
	... 53 more
{noformat}

> NoClassDefFoundError when starting app on Google App Engine
> -----------------------------------------------------------
>
>                 Key: LOG4J2-1051
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1051
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>         Environment: master branch, JDK7, Google App Engine, Apache Struts 2.5
>            Reporter: Lukasz Lenart
>             Fix For: 2.4
>
>
> I have an app that uses
> - log4j-api
> - log4j-core
> - log4j-web
> and after deploying it to GAE I see such exception in the logs
> {noformat}
> 2015-06-10 23:01:05.768
> Uncaught exception from servlet
> java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.util.Loader
> 	at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:114)
> 	at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:105)
> 	at org.apache.logging.log4j.core.config.NullConfiguration.<init>(NullConfiguration.java:30)
> 	at org.apache.logging.log4j.core.LoggerContext.<clinit>(LoggerContext.java:62)
> 	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:145)
> 	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:70)
> 	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:57)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:142)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:42)
> 	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:175)
> 	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:426)
> 	at org.apache.struts2.tiles.StrutsTilesListener.<clinit>(StrutsTilesListener.java:50)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> 	at java.lang.Class.newInstance(Class.java:375)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
> 	at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
> 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
> 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 	at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:199)
> 	at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:174)
> 	at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
> 	at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:527)
> 	at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
> 	at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
> 	at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230)
> 	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
> 	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
> 	at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
> 	at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message