Eclise Connection es5.0.2 Error error Statuslogger could not reconfigure JMX java.lang.noclassdeffounderror:org/a

Source: Internet
Author: User
Tags log4j

After the investigation is 5.0.2 version of the Pom dependency problem 2.7 There is no daemonthreadfactory class, and es5.0.2 in Server.class and downloaded Server.class write different, find class inconsistent, so can only change dependencies.

Workaround:

1.pom.xml

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>


</properties>
<dependencies>


<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.7</version>
</dependency>


The second method is as follows:

Pom.xml

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>


</properties>
<dependencies>


<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6</version>
</dependency>


The third method is as follows:

Pom.xml

<properties>
<project.build.sourceencoding>utf-8</project.build.sourceencoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</ Maven.compiler.target>


</properties>
<dependencies>


<dependency>
<groupid>org.elasticsearch.client</groupid>
<artifactId>transport</artifactId>
<version>5.0.2</version>
</dependency>
<dependency>
<groupId> Org.apache.logging.log4j</groupid>
<artifactid>log4j-api</artifactid>
<version> 2.7</version>
</dependency>
<dependency>
<groupid>org.apache.logging.log4j </groupid>
<artifactid>log4j-core</artifactid>
<version>2.7</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.7</version>
</dependency>

Fourth method

Add System.setproperty to the code ("Log4j2.disable.jmx", Boolean.TRUE.toString ());


ERROR statuslogger No log4j2 configuration file found. The Using default configuration:logging only errors to the console.
ERROR Statuslogger could not reconfigure JMX
Java.lang.noclassdeffounderror:org/apache/logging/log4j/core/async/daemonthreadfactory
At Org.apache.logging.log4j.core.jmx.Server.createExecutor (server.java:81)
At Org.apache.logging.log4j.core.jmx.server.<clinit> (server.java:66)
At Org.apache.logging.log4j.core.LoggerContext.setConfiguration (loggercontext.java:541)
At Org.apache.logging.log4j.core.LoggerContext.reconfigure (loggercontext.java:603)
At Org.apache.logging.log4j.core.LoggerContext.reconfigure (loggercontext.java:620)
At Org.apache.logging.log4j.core.LoggerContext.start (loggercontext.java:226)
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.elasticsearch.common.logging.ESLoggerFactory.getLogger (esloggerfactory.java:49)
At Org.elasticsearch.common.logging.Loggers.getLogger (loggers.java:105)
At Org.elasticsearch.common.logging.Loggers.getLogger (loggers.java:72)
At Org.elasticsearch.common.component.abstractcomponent.<init> (abstractcomponent.java:37)
At Org.elasticsearch.plugins.pluginsservice.<init> (pluginsservice.java:110)
At Org.elasticsearch.client.transport.TransportClient.newPluginService (transportclient.java:92)
At Org.elasticsearch.client.transport.TransportClient.buildTemplate (transportclient.java:117)
At Org.elasticsearch.client.transport.transportclient.<init> (transportclient.java:241)
At Org.elasticsearch.transport.client.prebuilttransportclient.<init> (prebuilttransportclient.java:92)
At Org.elasticsearch.transport.client.prebuilttransportclient.<init> (prebuilttransportclient.java:81)
At Org.elasticsearch.transport.client.prebuilttransportclient.<init> (prebuilttransportclient.java:71)
At Com.ecloud.test.main (test.java:17)
caused by:java.lang.ClassNotFoundException:org.apache.logging.log4j.core.async.DaemonThreadFactory
At Java.net.URLClassLoader.findClass (urlclassloader.java:381)
At Java.lang.ClassLoader.loadClass (classloader.java:424)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:331)
At Java.lang.ClassLoader.loadClass (classloader.java:357)
... More
Log4j:warn No Appenders could is found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
Log4j:warn Please initialize the log4j system properly.
Log4j:warn http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Hello
ERROR Statuslogger Unable to unregister Mbeans
Java.lang.NoClassDefFoundError:Could not initialize class Org.apache.logging.log4j.core.jmx.Server
At Org.apache.logging.log4j.core.LoggerContext.stop (loggercontext.java:317)
At Org.apache.logging.log4j.core.AbstractLifeCycle.stop (abstractlifecycle.java:127)
At Org.apache.logging.log4j.core.loggercontext$1.run (loggercontext.java:275)
At Org.apache.logging.log4j.core.util.defaultshutdowncallbackregistry$registeredcancellable.run ( DEFAULTSHUTDOWNCALLBACKREGISTRY.JAVA:104)
At Org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.run (Defaultshutdowncallbackregistry.java : 74)
At Java.lang.Thread.run (thread.java:745)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.