No log4j2 configuration file found

I tried to import a Maven Project on Eclipse, but there's problem. Eclipse sent me this :

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.

But, I checked and I have a in the path src/main/resources :

appender.console.type = Console = console
appender.console.layout.type = PatternLayout
rootLogger.level = info
rootLogger.appenderRef.console.ref = console 

This is my pom.xml :

<project xmlns="" xmlns:xsi=""







That's my that I tried to compile :

package projet;


import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.transport.client.PreBuiltTransportClient;

 * Hello world!
public class App 
    public static void main( String[] args )
    	// on startup
    		TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
    		        .addTransportAddress(new InetSocketTransportAddress(InetAddress.getLocalHost(), 9300));
    		catch(UnknownHostException u){
    		  System.out.println("exception:" + u.getMessage());

It's weird because I always think, when I modify my files, to compile with "mvn compile" or refresh on Eclipse.

Thank you for your answers. :wink:

This is happening when you launch from eclipse or from the command line?

This is when I launch from eclipse :wink:

My bet is that something is not well configured within eclipse.
But as I'm not using eclipse for more than 4 years now I doubt I can help more.

At least check that you have all files in the target/classes dir.

I will check that. But have you got a simple example of Java classes in ElasticSearch ?
An example which create an index, add a Document and search this Document.

Thank you for your help !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.