Log4j 2
  1. Log4j 2
  2. LOG4J2-713

Android: java.lang.VerifyError: org/apache/logging/log4j/core/util/Closer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc2
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Android

      Description

      Problem running on Android found after fixing the initial problem reported in LOG4J2-703

      07-14 16:51:59.927    1321-1321/com.torointl.log4j2xtest E/AndroidRuntime﹕ FATAL EXCEPTION: main
          Process: com.torointl.log4j2xtest, PID: 1321
          java.lang.VerifyError: org/apache/logging/log4j/core/util/Closer
                  at org.apache.logging.log4j.core.config.plugins.util.PluginManager.decode(PluginManager.java:180)
                  at org.apache.logging.log4j.core.config.plugins.util.PluginManager.loadPlugins(PluginManager.java:122)
                  at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:116)
                  at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:101)
                  at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:129)
                  at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:110)
                  at org.apache.logging.log4j.core.layout.PatternLayout.createPatternParser(PatternLayout.java:209)
                  at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:123)
                  at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:54)
                  at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:368)
                  at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:56)
                  at org.apache.logging.log4j.core.LoggerContext.<init>(LoggerContext.java:72)
                  at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218)
                  at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:144)
                  at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:80)
                  at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:72)
                  at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:37)
                  at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:473)
                  at com.torointl.log4j2xtest.MyActivity.<clinit>(MyActivity.java:14)
                  at java.lang.Class.newInstanceImpl(Native Method)
                  at java.lang.Class.newInstance(Class.java:1208)
                  at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
                  at android.app.ActivityThread.access$800(ActivityThread.java:135)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5017)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                  at dalvik.system.NativeStart.main(Native Method)
      

        Issue Links

          Activity

          Hide
          Gary Gregory added a comment -

          Fixed in SVN.

          Show
          Gary Gregory added a comment - Fixed in SVN.
          Hide
          Gary Gregory added a comment -

          Please verify this fix by checking out and building trunk. Beware of the Log4j version numbers in the POM which may be in flux as we are in the middle voting on whether or not to release 2.0.

          Show
          Gary Gregory added a comment - Please verify this fix by checking out and building trunk. Beware of the Log4j version numbers in the POM which may be in flux as we are in the middle voting on whether or not to release 2.0.
          Hide
          Nelson MELINA added a comment -

          Gary Gregory
          I just tried with revision 1610631 (version 2.1-SNAPSHOT)

          07-15 09:35:54.355    1297-1297/com.torointl.log4j2xtest E/dalvikvm﹕ Could not find class 'javax.naming.InitialContext', referenced from method org.apache.logging.log4j.core.lookup.JndiLookup.lookup
          07-15 09:35:54.355    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to resolve new-instance 388 (Ljavax/naming/InitialContext;) in Lorg/apache/logging/log4j/core/lookup/JndiLookup;
          07-15 09:35:54.363    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to resolve exception class 390 (Ljavax/naming/NamingException;)
          07-15 09:35:54.363    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to find exception handler at addr 0x19
          07-15 09:35:54.367    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY:  rejected Lorg/apache/logging/log4j/core/lookup/JndiLookup;.lookup (Lorg/apache/logging/log4j/core/LogEvent;Ljava/lang/String;)Ljava/lang/String;
          07-15 09:35:54.371    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY:  rejecting opcode 0x0d at 0x0019
          07-15 09:35:54.375    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY:  rejected Lorg/apache/logging/log4j/core/lookup/JndiLookup;.lookup (Lorg/apache/logging/log4j/core/LogEvent;Ljava/lang/String;)Ljava/lang/String;
          07-15 09:35:54.375    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Verifier rejected class Lorg/apache/logging/log4j/core/lookup/JndiLookup;
          07-15 09:35:54.467    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lcom/torointl/log4j2xtest/MyActivity;
          07-15 09:35:54.471    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Class init failed in newInstance call (Lcom/torointl/log4j2xtest/MyActivity;)
          07-15 09:35:54.471    1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa4d8cb20)
          07-15 09:35:54.479    1297-1297/com.torointl.log4j2xtest E/AndroidRuntime﹕ FATAL EXCEPTION: main
              Process: com.torointl.log4j2xtest, PID: 1297
              java.lang.VerifyError: org/apache/logging/log4j/core/lookup/JndiLookup
                      at dalvik.system.DexFile.defineClassNative(Native Method)
                      at dalvik.system.DexFile.defineClass(DexFile.java:222)
                      at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:215)
                      at dalvik.system.DexPathList.findClass(DexPathList.java:322)
                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
                      at org.apache.logging.log4j.core.util.ClassLoaderResourceLoader.loadClass(ClassLoaderResourceLoader.java:37)
                      at org.apache.logging.log4j.core.config.plugins.util.PluginManager.decode(PluginManager.java:168)
                      at org.apache.logging.log4j.core.config.plugins.util.PluginManager.loadPlugins(PluginManager.java:122)
                      at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:116)
                      at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:101)
                      at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:129)
                      at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:110)
                      at org.apache.logging.log4j.core.layout.PatternLayout.createPatternParser(PatternLayout.java:209)
                      at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:123)
                      at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:54)
                      at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:368)
                      at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:56)
                      at org.apache.logging.log4j.core.LoggerContext.<init>(LoggerContext.java:72)
                      at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218)
                      at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:144)
                      at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:80)
                      at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:72)
                      at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:37)
                      at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:473)
                      at com.torointl.log4j2xtest.MyActivity.<clinit>(MyActivity.java:14)
                      at java.lang.Class.newInstanceImpl(Native Method)
                      at java.lang.Class.newInstance(Class.java:1208)
                      at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
                      at android.app.ActivityThread.access$800(ActivityThread.java:135)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:136)
                      at android.app.ActivityThread.main(ActivityThread.java:5017)
                      at java.lang.reflect.Method.invokeNative(Native Method)
                      at java.lang.reflect.Method.invoke(Method.java:515)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                      at dalvik.system.NativeStart.main(Native Method)
          
          
          Show
          Nelson MELINA added a comment - Gary Gregory I just tried with revision 1610631 (version 2.1-SNAPSHOT) 07-15 09:35:54.355 1297-1297/com.torointl.log4j2xtest E/dalvikvm﹕ Could not find class 'javax.naming.InitialContext', referenced from method org.apache.logging.log4j.core.lookup.JndiLookup.lookup 07-15 09:35:54.355 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to resolve new-instance 388 (Ljavax/naming/InitialContext;) in Lorg/apache/logging/log4j/core/lookup/JndiLookup; 07-15 09:35:54.363 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to resolve exception class 390 (Ljavax/naming/NamingException;) 07-15 09:35:54.363 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: unable to find exception handler at addr 0x19 07-15 09:35:54.367 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: rejected Lorg/apache/logging/log4j/core/lookup/JndiLookup;.lookup (Lorg/apache/logging/log4j/core/LogEvent;Ljava/lang/String;)Ljava/lang/String; 07-15 09:35:54.371 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: rejecting opcode 0x0d at 0x0019 07-15 09:35:54.375 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: rejected Lorg/apache/logging/log4j/core/lookup/JndiLookup;.lookup (Lorg/apache/logging/log4j/core/LogEvent;Ljava/lang/String;)Ljava/lang/String; 07-15 09:35:54.375 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Verifier rejected class Lorg/apache/logging/log4j/core/lookup/JndiLookup; 07-15 09:35:54.467 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lcom/torointl/log4j2xtest/MyActivity; 07-15 09:35:54.471 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ Class init failed in newInstance call (Lcom/torointl/log4j2xtest/MyActivity;) 07-15 09:35:54.471 1297-1297/com.torointl.log4j2xtest W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa4d8cb20) 07-15 09:35:54.479 1297-1297/com.torointl.log4j2xtest E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.torointl.log4j2xtest, PID: 1297 java.lang.VerifyError: org/apache/logging/log4j/core/lookup/JndiLookup at dalvik.system.DexFile.defineClassNative(Native Method) at dalvik.system.DexFile.defineClass(DexFile.java:222) at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:215) at dalvik.system.DexPathList.findClass(DexPathList.java:322) at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at org.apache.logging.log4j.core.util.ClassLoaderResourceLoader.loadClass(ClassLoaderResourceLoader.java:37) at org.apache.logging.log4j.core.config.plugins.util.PluginManager.decode(PluginManager.java:168) at org.apache.logging.log4j.core.config.plugins.util.PluginManager.loadPlugins(PluginManager.java:122) at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:116) at org.apache.logging.log4j.core.config.plugins.util.PluginManager.collectPlugins(PluginManager.java:101) at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:129) at org.apache.logging.log4j.core.pattern.PatternParser.<init>(PatternParser.java:110) at org.apache.logging.log4j.core.layout.PatternLayout.createPatternParser(PatternLayout.java:209) at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:123) at org.apache.logging.log4j.core.layout.PatternLayout.<init>(PatternLayout.java:54) at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:368) at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:56) at org.apache.logging.log4j.core.LoggerContext.<init>(LoggerContext.java:72) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:144) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:80) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:72) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:37) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:473) at com.torointl.log4j2xtest.MyActivity.<clinit>(MyActivity.java:14) at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1208) at android.app.Instrumentation.newActivity(Instrumentation.java:1061) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5017) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method)

            People

            • Assignee:
              Unassigned
              Reporter:
              Nelson MELINA
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development