Error to integrate elastic high rest client on Weblogic

Hello all,
I should integrate the elastic search high rest client on my java web app.

I put this dependecies on pom :

 	 	<dependency>
			<groupId>org.elasticsearch.client</groupId>
			<artifactId>elasticsearch-rest-client</artifactId>
			<version>6.4.3</version>
		</dependency>
		
		<dependency>
			<groupId>org.elasticsearch.client</groupId>
			<artifactId>elasticsearch-rest-high-level-client</artifactId>
			<version>6.4.3</version>
		</dependency>   

My Class is this to connection on my instance of Elastic :

public class Client {
	
	      public static void main(String[] args) throws IOException {
    	        
    	 RestHighLevelClient aesClient = aesClient();
    	  }
    	  public static RestHighLevelClient aesClient() {
    	    	RestHighLevelClient client = new RestHighLevelClient(
    	    	        RestClient.builder(
    	    	                new HttpHost("xx.xx.xx.xxx", 9200, "http"),
    	    	                new HttpHost("xx.xx.xx.xxx", 9201, "http")));
    	        return  client;
    	    }

But i have this error when i try to upload the package on Weblogic web server :
Module named 'm2mServer-ear' failed to deploy. See Error Log view for more detail.
weblogic.application.ModuleException: null
null
Exception received from deployment driver. See Error Log view for more detail.

WebLogic Version is : 12.1.3
Java version 1.8

There is nothing we can tell with that.

What is the output of mvn dependency:tree if you are using Maven?

This is my Maven Dependecies :

I don't have any error when a compile the package , the error is runTime :

There's nothing we can say from that I think.
You should may be look at the weblogic logs?

In weblogic log this is the only error i can see :

ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1589891835759> <BEA-149265> <Failure occurred in the execution of deployment request with ID "587319399982400" for task "0". Error is: "weblogic.application.ModuleException: null
null"
weblogic.application.ModuleException: null
null
at weblogic.servlet.internal.WebAppModule.createModuleException(WebAppModule.java:1824)
at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:270)
at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:682)

  at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:41)
at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:240)

If i try to remove the elastic dependecies from the pom , it works successfully

    	<dependency>
			<groupId>org.elasticsearch.client</groupId>
			<artifactId>elasticsearch-rest-high-level-client</artifactId>
			<version>6.4.3</version>
		</dependency>    

Could be the problem the weblogic version ? or I need to insert any configuration for the elastic library in weblogic.xml file ?

May be a conflict between a library provided by WebLo and the ones provided within you project.

At the very least, I can say that nothing from the logs is coming from Elasticsearch.

I found this while searching on Google. That might help? https://stackoverflow.com/questions/37452023/java-lang-nosuchmethoderror-during-elastic-search-start

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