-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Getting java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.elasticsearch.client.ClusterNodes while upgrading Spring Boot 2.1.7 with ELasticData Project #17934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I suspect that the versions of Elasticsearch and Spring Data Elasticsearch that you are using are not compatible. Can you please provide the complete stack trace of the failure and attach a zip that contains a minimal sample that we can run to reproduce the problem? |
its a huge module of my project, I can give you the full Pom.xml file ,Let me know what else you require <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ericsson.edos.automation.agent</groupId>
<artifactId>automation_agent</artifactId>
<version>2.2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>automation-agent</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
<relativePath />
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<!-- Encription -->
<ttc-crypto.version>1.0.0</ttc-crypto.version>
<jsch.version>0.1.51</jsch.version>
<!-- Test -->
<jacoco.maven.plugin.version>0.7.5.201505241946</jacoco.maven.plugin.version>
<!-- creation docker images -->
<docker.host>http://docker-builder.edosdp.ericsson.se:2375</docker.host>
<!-- Docker images configuration -->
<docker.java.image>docker-registry.edosdp.ericsson.se/dev/openjdk:8u151-jre</docker.java.image>
<docker.image>docker-registry.edosdp.ericsson.se/dev/${project.artifactId}:${ci.build.id}</docker.image>
<docker.port.container.automation>8790</docker.port.container.automation>
<!-- Sonar -->
<sonar-maven-plugin.version>3.5</sonar-maven-plugin.version>
<sonar.language>java</sonar.language>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
<sonar.projectName>automation-agent</sonar.projectName>
<!-- Redefine coverage-reports folder -->
<jacoco.ut.execution.data.file>${session.executionRootDirectory}/coverage-reports/jacoco-ut.exec</jacoco.ut.execution.data.file>
<jacoco.it.execution.data.file>${session.executionRootDirectory}/coverage-reports/jacoco-it.exec</jacoco.it.execution.data.file>
<docker.maven.plugin.version>0.13.8</docker.maven.plugin.version>
<maven-site-plugin-version>3.7.1</maven-site-plugin-version>
<maven.report.version>0.1</maven.report.version>
<!-- Override ElasticSearch version included in Spring Boot Starter 1.4.7 -->
<elasticsearch.version>6.2.2</elasticsearch.version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId>
<version>1.1.7.RELEASE</version> </dependency> -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.optimi.common</groupId>
<artifactId>ttc-crypto</artifactId>
<version>${ttc-crypto.version}</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>${jsch.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<!-- Site plugin to deploy using wagon to the deploy machine -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin-version}</version>
<configuration>
<locales>en</locales>
</configuration>
</plugin>
<!-- Used for unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>
<!-- Skips unit tests if the value of skip.unit.tests property is true -->
<skipTests>${skip.unit.tests}</skipTests>
<!-- Excludes integration tests when unit tests are run. -->
<excludes>
<exclude>**/IT*.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- Used for integration tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<!-- <version>${maven.surefire.plugin.version}</version> -->
<configuration>
<!-- Sets the VM argument line used when integration tests are run. -->
<argLine>${failsafeArgLine}
-Dspring.profiles.active=integration-test
</argLine>
</configuration>
<executions>
<!-- Invokes both the integration-test and the verify goals of the
Failsafe Maven plugin -->
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!-- Skips integration tests if the value of skip.integration.tests
property is true -->
<skipTests>${skip.integration.tests}</skipTests>
<includes>
<include>**/IT*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version>
<configuration>
<excludes>
<exclude>**org.drools/**</exclude>
<exclude>**/lib/*</exclude>
</excludes>
</configuration>
<executions>
<!-- Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed. -->
<execution>
<id>pre-unit-test</id>
<phase>process-test-classes</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${jacoco.ut.execution.data.file}</destFile>
<append>true</append>
<!-- Sets the name of the property containing the settings for JaCoCo
runtime agent. -->
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Ensures that the code coverage report for unit tests is created
after unit tests have been run. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${jacoco.ut.execution.data.file}</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
<!-- Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Failsafe plugin is executed. -->
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${jacoco.it.execution.data.file}</destFile>
<append>true</append>
<!-- Sets the name of the property containing the settings for JaCoCo
runtime agent. -->
<propertyName>failsafeArgLine</propertyName>
</configuration>
</execution>
<!-- Ensures that the code coverage report for integration tests after
integration tests have been run. -->
<execution>
<id>post-integration-test</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${jacoco.it.execution.data.file}</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-maven3-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<images>
<image>
<name>${docker.image}</name>
<build>
<maintainer>PDLOSDPIVD@ex1.eemea.ericsson.se</maintainer>
<from>${docker.java.image}</from>
<tags>
<tag>${docker.tag}</tag>
</tags>
<env>
<JAVA_MEM_OPTS>-Xmx1024m</JAVA_MEM_OPTS>
</env>
<assembly>
<mode>dir</mode>
<basedir>/</basedir>
<descriptor>assembly.xml</descriptor>
</assembly>
<ports>
<port>${docker.port.container.automation}</port>
</ports>
<runCmds>
<run>chmod +x /entrypoint.sh</run>
</runCmds>
<entryPoint>
<exec>
<arg>/entrypoint.sh</arg>
</exec>
</entryPoint>
<cmd>
<exec>
<arg>run</arg>
</exec>
</cmd>
</build>
</image>
</images>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>3.2.0</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=dev</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>prod</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>integration-test</id>
<properties>
<build.profile.id>integration-test</build.profile.id>
<skip.integration.tests>false</skip.integration.tests>
<skip.unit.tests>true</skip.unit.tests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
<arguments>
<argument>--spring.profiles.active=integration-test</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<reporting>
<plugins>
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version> <configuration> <additionalparam>-Xdoclint:none</additionalparam>
<failOnError>false</failOnError> </configuration> </plugin> -->
<plugin>
<groupId>org.codehaus.sonar-plugins</groupId>
<artifactId>maven-report</artifactId>
<version>${maven.report.version}</version>
</plugin>
</plugins>
</reporting>
<ciManagement>
<system>jenkins</system>
<url>http://jenkins.edosdp.ericsson.se:9070/</url>
</ciManagement>
<distributionManagement>
<site>
<id>server.edos-dp-ci-nexus.site</id>
<url>dav:http://rpm.edosdp.ericsson.se:8081/nexus/content/sites/edos-dp-site/${project.groupId}.${project.artifactId}.${project.version}</url>
</site>
<repository>
<id>edosdp-local-release</id>
<name>EDOS-DP Internal Releases repository</name>
<url>http://maven.edosdp.ericsson.se:8980/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>edosdp-local-snapshot</id>
<name>EDOS-DP Internal Snapshots repository</name>
<url>http://maven.edosdp.ericsson.se:8980/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
</project> |
previously we were using Spring Boot Starter 1.4.7 and elastic search 2.4.6 which was working fine |
We need something that reproduces the problem. I doesn't have to be your application's actual code, indeed we'd prefer that it isn't. All we need is the minimum that's necessary to reproduce the problem. As I said above, the complete stack trace of the failure would also be useful. If you can't provide at least one of those then unfortunately we won't be able to help you. |
this is the error
|
m trying to minimize my code ,will try to give you a sample also |
That seems to be a different error to the one in the title of this issue as it isn't a If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. |
yes ..i did that ..
|
Then we'll need a minimal sample that reproduces the problem please. It's not apparent from what you've shared thus far why that setting is not being picked up. If you can provide one we can re-open this issue and investigate. |
|
done :) |
Uh oh!
There was an error while loading. Please reload this page.
HI
I am upgrading my project to Spring boot 2.1.7 ,We have used Spring spring-boot-starter-data-elasticsearch over there,now while building m getting the below issue:
posting a short snippet of pom.xml file
The text was updated successfully, but these errors were encountered: