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

Nelson MELINA edited comment on LOG4J2-728 at 7/22/14 9:04 AM:
---------------------------------------------------------------

Here is what i just tested :
{code:title=MyActivity.java|borderStyle=solid}
public class MyActivity extends Activity {

    protected static Logger logger = null;
    public static AssetManager assetManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);

        System.setProperty("log4j2.disable.jmx", "true");
        System.setProperty("log4j.configurationFactory", 
"com.torointl.log4j2xtest.configuration.Log4J2ConfigurationFactory");
        
        StrictMode.ThreadPolicy policy = new 
StrictMode.ThreadPolicy.Builder().permitAll().build();

        StrictMode.setThreadPolicy(policy);
        assetManager = getAssets();
        //Log4J2ConfigurationFactory configLog4J2 = new 
Log4J2ConfigurationFactory(getAssets());

        //ConfigurationFactory.setConfigurationFactory(configLog4J2);
        logger = LogManager.getLogger();

        try {
            logger.debug("TEST NELSON2 
############################################");
            logger.debug("TEST NELSON3 
############################################");
            logger.debug("TEST NELSON4 
############################################");


        } catch (Exception e) {
            Log.e("NELSON", " Cause => " + e.getCause() + " | Message => " + 
e.getMessage() + " | Stacktrace " + e.getStackTrace(), e);
        }

        logger.debug("TEST NELSON5 
############################################");
        logger.debug("TEST NELSON6 
############################################");
        logger.debug("TEST NELSON7 
############################################");
        logger.debug("TEST NELSON8 
############################################");
        logger.debug("TEST NELSON9 
############################################");
        logger.debug("TEST NELSON10 
############################################");
        logger.debug("TEST NELSON11 
############################################");
        logger.debug("TEST NELSON12 
############################################");
        logger.error("TEST NELSON13 
############################################");
    }
{code}

{code:title=Log4J2ConfigurationFactory.java|borderStyle=solid}
@Plugin(name = "Log4J2ConfigurationFactory", category = "ConfigurationFactory")
@Order(1)
public class Log4J2ConfigurationFactory extends XmlConfigurationFactory {

    private AssetManager assetManager;

    public Log4J2ConfigurationFactory(AssetManager assetManager) {
        super();
        this.assetManager = assetManager;
    }

    public Log4J2ConfigurationFactory() {
        super();
        assetManager = MyActivity.assetManager;
    }

    @Override
    protected ConfigurationSource getInputFromUri(URI configLocation) {
        InputStream inputStream = null;
        ConfigurationSource configSource = null;
        try {
            inputStream = assetManager.open("log4j2.xml");
            configSource = new ConfigurationSource(inputStream);
        } catch (IOException e) {
            //Log.e("tag", e.getMessage());
            System.out.println("NELSON IOException => " + e.getMessage() );
            throw new IllegalStateException(e);
        }
        return configSource;
    }
}
{code}

{noFormat}
07-22 09:04:06.940    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
Late-enabling CheckJNI
07-22 09:04:07.508    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
GC_FOR_ALLOC freed 242K, 10% free 2933K/3232K, paused 10ms, total 11ms
07-22 09:04:07.520    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'javax.naming.InitialContext', referenced from method 
org.apache.logging.log4j.core.lookup.JndiLookup.lookup
07-22 09:04:07.520    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 1973 (Ljavax/naming/InitialContext;) in 
Lorg/apache/logging/log4j/core/lookup/JndiLookup;
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0006
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve exception class 1975 (Ljavax/naming/NamingException;)
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find exception handler at addr 0x19
07-22 09:04:07.524    1730-1730/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-22 09:04:07.528    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY:  
rejecting opcode 0x0d at 0x0019
07-22 09:04:07.528    1730-1730/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-22 09:04:07.528    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Verifier 
rejected class Lorg/apache/logging/log4j/core/lookup/JndiLookup;
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [d]
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [d] starting at position 16 in 
conversion pattern.
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [thread]
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [thread] starting at position 25 
in conversion pattern.
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [level]
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [level] starting at position 35 
in conversion pattern.
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [logger]
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [logger] starting at position 47 
in conversion pattern.
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [msg]
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in 
conversion pattern.
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [n]
07-22 09:04:07.548    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [n] starting at position 56 in 
conversion pattern.
07-22 09:04:07.564    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.576    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.596    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.620    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [d]
07-22 09:04:07.636    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [d] starting at position 16 in 
conversion pattern.
07-22 09:04:07.652    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [thread]
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
GC_FOR_ALLOC freed 457K, 15% free 2991K/3504K, paused 3ms, total 3ms
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [thread] starting at position 25 
in conversion pattern.
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [level]
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [level] starting at position 35 
in conversion pattern.
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [logger]
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [logger] starting at position 47 
in conversion pattern.
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [msg]
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in 
conversion pattern.
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [n]
07-22 09:04:07.680    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [n] starting at position 56 in 
conversion pattern.
07-22 09:04:07.680    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method javax.management.MBeanServer.registerMBean, referenced from method 
org.apache.logging.log4j.core.jmx.Server.register
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve interface method 16378: 
Ljavax/management/MBeanServer;.registerMBean 
(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x72 at 0x000d
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin; 
(1968)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;' failed
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'org.apache.logging.log4j.core.jmx.StatusLoggerAdmin', referenced 
from method org.apache.logging.log4j.core.jmx.Server.registerStatusLogger
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 3416 
(Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0000
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method 
org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0010
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin; 
(1968)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;' failed
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'org.apache.logging.log4j.core.jmx.LoggerContextAdmin', referenced 
from method 
org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 3411 
(Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0042
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'javax.management.ObjectName', referenced from method 
org.apache.logging.log4j.core.jmx.Server.unregisterAllMatching
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 1970 (Ljavax/management/ObjectName;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0000
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method 
org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0000
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method org.apache.logging.log4j.core.jmx.Server.unregisterMBeans
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0000
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.748    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.752    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.756    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.760    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.764    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.768    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.772    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin; 
(1968)
07-22 09:04:07.772    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;' failed
07-22 09:04:07.776    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x70d4 at 0x02 in 
Lorg/apache/logging/log4j/core/jmx/Server;.registerStatusLogger
07-22 09:04:07.780    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin; 
(1968)
07-22 09:04:07.780    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;' failed
07-22 09:04:07.784    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x7092 at 0x46 in 
Lorg/apache/logging/log4j/core/jmx/Server;.reregisterMBeansAfterReconfigure
07-22 09:04:07.788    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x4000 at 0x02 in 
Lorg/apache/logging/log4j/core/jmx/Server;.unregisterAllMatching
07-22 09:04:07.808    1730-1730/com.torointl.log4j2xtest I/System.out﹕ %d 
[%thread] %-5level %logger - %msg%n
07-22 09:04:07.860    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libEGL_genymotion.so
07-22 09:04:07.864    1730-1730/com.torointl.log4j2xtest D/﹕ 
HostConnection::get() New Host Connection established 0xb7ef0798, tid 1730
07-22 09:04:07.872    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libGLESv1_CM_genymotion.so
07-22 09:04:07.872    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libGLESv2_genymotion.so
07-22 09:04:07.912    1730-1730/com.torointl.log4j2xtest W/EGL_genymotion﹕ 
eglSurfaceAttrib not implemented
07-22 09:04:07.912    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
Getting MAX_TEXTURE_SIZE from GradienCache
07-22 09:04:07.916    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
MAX_TEXTURE_SIZE: 8192
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
MAX_TEXTURE_SIZE: 8192
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest D/OpenGLRenderer﹕ 
Enabling debug mode 0

{noFormat}

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="debug">

    <Properties>
        <Property name="logFileError">target/error.log</Property>
        <Property name="logFileSimpleLog">target/simpleLog.log</Property>
        <Property name="logFileBIEvents">target/biEvents.log</Property>
    </Properties>

    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} 
#### - %msg%n"/>
        </Console>
        <RandomAccessFile name="appenderLogFileError" 
fileName="${logFileError}">
            <XMLLayout />
            <MarkerFilter marker="logError" onMatch="ACCEPT" onMismatch="DENY"/>
        </RandomAccessFile>
        <RandomAccessFile name="appenderLogFileSimpleLog" 
fileName="${logFileSimpleLog}">
            <JSONLayout />
            <MarkerFilter marker="logSimpleLog" onMatch="ACCEPT" 
onMismatch="DENY"/>
        </RandomAccessFile>
        <RandomAccessFile name="appenderLogFileBIEvents" 
fileName="${logFileBIEvents}">
            <XMLLayout />
            <MarkerFilter marker="logBIGEvents" onMatch="ACCEPT" 
onMismatch="DENY"/>
        </RandomAccessFile>
    </Appenders>

    <Root level="trace">
        <AppenderRef ref="appenderLogFileError" level="debug"/>
        <AppenderRef ref="appenderLogFileSimpleLog" level="debug"/>
        <AppenderRef ref="appenderLogFileBIEvents" level="debug"/>
        <AppenderRef ref="Console" level="trace"/>
    </Root>

</Configuration>
{code}


was (Author: daln):
Here is what i just test :
{code:title=MyActivity.java|borderStyle=solid}
public class MyActivity extends Activity {

    protected static Logger logger = null;
    public static AssetManager assetManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);

        System.setProperty("log4j2.disable.jmx", "true");
        System.setProperty("log4j.configurationFactory", 
"com.torointl.log4j2xtest.configuration.Log4J2ConfigurationFactory");
        
        StrictMode.ThreadPolicy policy = new 
StrictMode.ThreadPolicy.Builder().permitAll().build();

        StrictMode.setThreadPolicy(policy);
        assetManager = getAssets();
        //Log4J2ConfigurationFactory configLog4J2 = new 
Log4J2ConfigurationFactory(getAssets());

        //ConfigurationFactory.setConfigurationFactory(configLog4J2);
        logger = LogManager.getLogger();

        try {
            logger.debug("TEST NELSON2 
############################################");
            logger.debug("TEST NELSON3 
############################################");
            logger.debug("TEST NELSON4 
############################################");


        } catch (Exception e) {
            Log.e("NELSON", " Cause => " + e.getCause() + " | Message => " + 
e.getMessage() + " | Stacktrace " + e.getStackTrace(), e);
        }

        logger.debug("TEST NELSON5 
############################################");
        logger.debug("TEST NELSON6 
############################################");
        logger.debug("TEST NELSON7 
############################################");
        logger.debug("TEST NELSON8 
############################################");
        logger.debug("TEST NELSON9 
############################################");
        logger.debug("TEST NELSON10 
############################################");
        logger.debug("TEST NELSON11 
############################################");
        logger.debug("TEST NELSON12 
############################################");
        logger.error("TEST NELSON13 
############################################");
    }
{code}

{code:title=Log4J2ConfigurationFactory.java|borderStyle=solid}
@Plugin(name = "Log4J2ConfigurationFactory", category = "ConfigurationFactory")
@Order(1)
public class Log4J2ConfigurationFactory extends XmlConfigurationFactory {

    private AssetManager assetManager;

    public Log4J2ConfigurationFactory(AssetManager assetManager) {
        super();
        this.assetManager = assetManager;
    }

    public Log4J2ConfigurationFactory() {
        super();
        assetManager = MyActivity.assetManager;
    }

    @Override
    protected ConfigurationSource getInputFromUri(URI configLocation) {
        InputStream inputStream = null;
        ConfigurationSource configSource = null;
        try {
            inputStream = assetManager.open("log4j2.xml");
            configSource = new ConfigurationSource(inputStream);
        } catch (IOException e) {
            //Log.e("tag", e.getMessage());
            System.out.println("NELSON IOException => " + e.getMessage() );
            throw new IllegalStateException(e);
        }
        return configSource;
    }
}
{code}

{noFormat}
07-22 09:04:06.940    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
Late-enabling CheckJNI
07-22 09:04:07.508    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
GC_FOR_ALLOC freed 242K, 10% free 2933K/3232K, paused 10ms, total 11ms
07-22 09:04:07.520    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'javax.naming.InitialContext', referenced from method 
org.apache.logging.log4j.core.lookup.JndiLookup.lookup
07-22 09:04:07.520    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 1973 (Ljavax/naming/InitialContext;) in 
Lorg/apache/logging/log4j/core/lookup/JndiLookup;
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0006
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve exception class 1975 (Ljavax/naming/NamingException;)
07-22 09:04:07.524    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find exception handler at addr 0x19
07-22 09:04:07.524    1730-1730/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-22 09:04:07.528    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY:  
rejecting opcode 0x0d at 0x0019
07-22 09:04:07.528    1730-1730/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-22 09:04:07.528    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Verifier 
rejected class Lorg/apache/logging/log4j/core/lookup/JndiLookup;
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [d]
07-22 09:04:07.532    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [d] starting at position 16 in 
conversion pattern.
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [thread]
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [thread] starting at position 25 
in conversion pattern.
07-22 09:04:07.536    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [level]
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [level] starting at position 35 
in conversion pattern.
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [logger]
07-22 09:04:07.540    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [logger] starting at position 47 
in conversion pattern.
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [msg]
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in 
conversion pattern.
07-22 09:04:07.544    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [n]
07-22 09:04:07.548    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [n] starting at position 56 in 
conversion pattern.
07-22 09:04:07.564    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.576    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.596    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Rejecting 
re-init on previously-failed class 
Lorg/apache/logging/log4j/core/lookup/JndiLookup; v=0xa4dbabe8
07-22 09:04:07.620    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [d]
07-22 09:04:07.636    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [d] starting at position 16 in 
conversion pattern.
07-22 09:04:07.652    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [thread]
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ 
GC_FOR_ALLOC freed 457K, 15% free 2991K/3504K, paused 3ms, total 3ms
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [thread] starting at position 25 
in conversion pattern.
07-22 09:04:07.668    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [level]
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [level] starting at position 35 
in conversion pattern.
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [logger]
07-22 09:04:07.672    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [logger] starting at position 47 
in conversion pattern.
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [msg]
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in 
conversion pattern.
07-22 09:04:07.676    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized format specifier [n]
07-22 09:04:07.680    1730-1730/com.torointl.log4j2xtest W/System.err﹕ ERROR 
StatusLogger Unrecognized conversion specifier [n] starting at position 56 in 
conversion pattern.
07-22 09:04:07.680    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method javax.management.MBeanServer.registerMBean, referenced from method 
org.apache.logging.log4j.core.jmx.Server.register
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve interface method 16378: 
Ljavax/management/MBeanServer;.registerMBean 
(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;
07-22 09:04:07.684    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x72 at 0x000d
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.688    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.692    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.696    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/ObjectName;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin; 
(1968)
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;' failed
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'org.apache.logging.log4j.core.jmx.StatusLoggerAdmin', referenced 
from method org.apache.logging.log4j.core.jmx.Server.registerStatusLogger
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 3416 
(Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.700    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0000
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method 
org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0010
07-22 09:04:07.704    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin; 
(1968)
07-22 09:04:07.708    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;' failed
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'org.apache.logging.log4j.core.jmx.LoggerContextAdmin', referenced 
from method 
org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 3411 
(Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.712    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0042
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest E/dalvikvm﹕ Could not 
find class 'javax.management.ObjectName', referenced from method 
org.apache.logging.log4j.core.jmx.Server.unregisterAllMatching
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve new-instance 1970 (Ljavax/management/ObjectName;) in 
Lorg/apache/logging/log4j/core/jmx/Server;
07-22 09:04:07.716    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x22 at 0x0000
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.720    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.724    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.728    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method 
org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext
07-22 09:04:07.732    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0000
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.736    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest I/dalvikvm﹕ Could not 
find method java.lang.management.ManagementFactory.getPlatformMBeanServer, 
referenced from method org.apache.logging.log4j.core.jmx.Server.unregisterMBeans
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to resolve static method 14723: 
Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer 
()Ljavax/management/MBeanServer;
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ VFY: 
replacing opcode 0x71 at 0x0000
07-22 09:04:07.740    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.744    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.748    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.752    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.756    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.760    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.764    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.768    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ VFY: 
unable to find class referenced in signature (Ljavax/management/MBeanServer;)
07-22 09:04:07.772    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin; 
(1968)
07-22 09:04:07.772    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/StatusLoggerAdmin;' failed
07-22 09:04:07.776    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x70d4 at 0x02 in 
Lorg/apache/logging/log4j/core/jmx/Server;.registerStatusLogger
07-22 09:04:07.780    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Unable to 
resolve superclass of Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin; 
(1968)
07-22 09:04:07.780    1730-1730/com.torointl.log4j2xtest W/dalvikvm﹕ Link of 
class 'Lorg/apache/logging/log4j/core/jmx/LoggerContextAdmin;' failed
07-22 09:04:07.784    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x7092 at 0x46 in 
Lorg/apache/logging/log4j/core/jmx/Server;.reregisterMBeansAfterReconfigure
07-22 09:04:07.788    1730-1730/com.torointl.log4j2xtest D/dalvikvm﹕ DexOpt: 
unable to opt direct call 0x4000 at 0x02 in 
Lorg/apache/logging/log4j/core/jmx/Server;.unregisterAllMatching
07-22 09:04:07.808    1730-1730/com.torointl.log4j2xtest I/System.out﹕ %d 
[%thread] %-5level %logger - %msg%n
07-22 09:04:07.860    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libEGL_genymotion.so
07-22 09:04:07.864    1730-1730/com.torointl.log4j2xtest D/﹕ 
HostConnection::get() New Host Connection established 0xb7ef0798, tid 1730
07-22 09:04:07.872    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libGLESv1_CM_genymotion.so
07-22 09:04:07.872    1730-1730/com.torointl.log4j2xtest D/libEGL﹕ loaded 
/system/lib/egl/libGLESv2_genymotion.so
07-22 09:04:07.912    1730-1730/com.torointl.log4j2xtest W/EGL_genymotion﹕ 
eglSurfaceAttrib not implemented
07-22 09:04:07.912    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
Getting MAX_TEXTURE_SIZE from GradienCache
07-22 09:04:07.916    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
MAX_TEXTURE_SIZE: 8192
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest E/OpenGLRenderer﹕ 
MAX_TEXTURE_SIZE: 8192
07-22 09:04:07.924    1730-1730/com.torointl.log4j2xtest D/OpenGLRenderer﹕ 
Enabling debug mode 0

{noFormat}

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="debug">

    <Properties>
        <Property name="logFileError">target/error.log</Property>
        <Property name="logFileSimpleLog">target/simpleLog.log</Property>
        <Property name="logFileBIEvents">target/biEvents.log</Property>
    </Properties>

    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} 
#### - %msg%n"/>
        </Console>
        <RandomAccessFile name="appenderLogFileError" 
fileName="${logFileError}">
            <XMLLayout />
            <MarkerFilter marker="logError" onMatch="ACCEPT" onMismatch="DENY"/>
        </RandomAccessFile>
        <RandomAccessFile name="appenderLogFileSimpleLog" 
fileName="${logFileSimpleLog}">
            <JSONLayout />
            <MarkerFilter marker="logSimpleLog" onMatch="ACCEPT" 
onMismatch="DENY"/>
        </RandomAccessFile>
        <RandomAccessFile name="appenderLogFileBIEvents" 
fileName="${logFileBIEvents}">
            <XMLLayout />
            <MarkerFilter marker="logBIGEvents" onMatch="ACCEPT" 
onMismatch="DENY"/>
        </RandomAccessFile>
    </Appenders>

    <Root level="trace">
        <AppenderRef ref="appenderLogFileError" level="debug"/>
        <AppenderRef ref="appenderLogFileSimpleLog" level="debug"/>
        <AppenderRef ref="appenderLogFileBIEvents" level="debug"/>
        <AppenderRef ref="Console" level="trace"/>
    </Root>

</Configuration>
{code}

> Look for log4j2.xml in assets folder (or the application data) in an Android 
> APK.
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4J2-728
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-728
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.0-rc2
>         Environment: Android
>            Reporter: Nelson MELINA
>              Labels: android
>
> To add files in an Android apk, you need to put them in an assets folder and 
> then they are in an "assets" folder in the APK.
> Log4j 2 needs to find it there when it exists (not the case now).
> Also would it be possible to load the xml configuration file from the 
> application data ( 
> https://developer.android.com/guide/topics/data/data-storage.html ) ?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to