Spring-boot dependency problems - spring-boot

I'm trying to upgrade our project from Spring-boot 1.4.3 to 2.0.4.RELEASE;
Here is my current pom.xml file:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SpreadSheetUploadWeb</groupId>
<artifactId>SpreadSheetUploadWeb</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
<spring.version>4.3.9.RELEASE</spring.version>
<spring.boot.version>2.0.4.RELEASE</spring.boot.version>
<db2.driver.version>10.5.9</db2.driver.version>
<spring.batch.version>3.0.8.RELEASE</spring.batch.version>
<tomcat.version>8.5.6</tomcat.version>
<poi.version>3.15</poi.version>
<sonar.coverage.exclusions>**/BlueCostSpreadsheetUploadWebApplication.java</sonar.coverage.exclusions>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.version}</version>
<scope>test</scope>
</dependency>
<!-- POI dependencies -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- DB2 dependencies -->
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc_license_cisuz</artifactId>
<version>${db2.driver.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>${db2.driver.version}</version>
</dependency>
<!-- HSQLDB dependencies -->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.4.0</version><!--$NO-MVN-MAN-VER$ -->
<scope>test</scope>
</dependency>
<!-- JJD adding to make REST Test cases work
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency -->
<!-- JJD adding Sonarqube dependency -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<!-- JJD The next two are for generating Swagger Documents for REST api documentation -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
<build>
<finalName>bluecost-spreadsheet-web</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>AT*</exclude>
<exclude>IT*</exclude>
<exclude>BlueCostSpreadsheetUploadTestSuite</exclude>
</excludes>
<skipTests>${skip.surefire.tests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<excludes>
<exclude>TestApplicationProperties</exclude>
<exclude>UTSampleTests</exclude>
<exclude>FT*</exclude>
<exclude>UT*</exclude>
</excludes>
<!-- Sets the VM argument line used when integration tests are run. -->
<argLine>${failsafeArgLine}</argLine>
<!--
Skips integration tests if the value of skip.integration.tests property
is true
-->
<skipTests>${skip.failsafe.tests}</skipTests>
</configuration>
</execution>
</executions>
</plugin>
<!--
Unit Test Jacoco Reports
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<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>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<skipTests>${skip.surefire.tests}</skipTests>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
</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>
<skipTests>${skip.surefire.tests}</skipTests>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Now, when I run 'mvn test' on existing test cases, I get the following error:
[INFO] Running com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests
Aug 06, 2018 5:19:12 PM org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTestContextBootstrapper buildDefaultMergedContextConfiguration
INFO: Neither #ContextConfiguration nor #ContextHierarchy found for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests], using SpringBootContextLoader
Aug 06, 2018 5:19:12 PM org.springframework.test.context.support.AbstractContextLoader generateDefaultLocations
INFO: Could not detect default resource locations for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests]: no resource found for suffixes {-context.xml, Context.groovy}.
Aug 06, 2018 5:19:12 PM org.springframework.test.context.support.AnnotationConfigContextLoaderUtils detectDefaultConfigurationClasses
INFO: Could not detect default configuration classes for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests]: UTBlueCostRestControllerTests does not declare any static, non-private, non-final, nested classes annotated with #Configuration.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.083 s <<< FAILURE! - in com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests
[ERROR] initializationError(com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests) Time elapsed: 0.015 s <<< ERROR!
java.lang.NoSuchMethodError: org.springframework.util.Assert.state(ZLjava/util/function/Supplier;)V
I found some threads on this topic that indicate that there is a problem with the classpath - most likely that spring-core is in the classpath twice, but I can't locate the problem. I've printed the dependendency tree using mvn dependency plugin as an aid in troubleshooting, but I don't see anything obviously wrong. Please help:
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:pom:3.4.0.905 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:pom:3.4.0.905
[INFO] SpreadSheetUploadWeb:SpreadSheetUploadWeb:jar:1.0
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.4.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.4.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:4.3.9.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.4.RELEASE:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] | \- org.springframework:spring-jdbc:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.4.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.4.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.6:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.6:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.6:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.11.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.4.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:4.3.9.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.apache.poi:poi-ooxml:jar:3.15:compile
[INFO] | \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- org.apache.poi:poi:jar:3.15:compile
[INFO] | +- commons-codec:commons-codec:jar:1.11:compile
[INFO] | \- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- org.apache.poi:poi-ooxml-schemas:jar:3.15:compile
[INFO] | \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] | \- stax:stax-api:jar:1.0.1:compile
[INFO] +- com.ibm.db2.jcc:db2jcc_license_cisuz:jar:10.5.9:compile
[INFO] +- com.ibm.db2.jcc:db2jcc4:jar:10.5.9:compile
[INFO] +- org.hsqldb:hsqldb:jar:2.4.0:test
[INFO] +- org.sonarsource.scanner.maven:sonar-maven-plugin:pom:3.4.0.905:compile
[INFO] | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[INFO] | +- org.sonarsource.scanner.api:sonar-scanner-api:jar:2.10.0.1189:compile
[INFO] | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.flywaydb:flyway-core:jar:5.0.7:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] \- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
I should Add that I have run the following commands on my machine after the version update:
mvn clean
mvn eclipse:clean
mvn eclipse:eclipse
Project update in Eclipse. I can maybe try to re-import to another workspace, but at this point I'm out of ideas and need help.

As mentioned at https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes#third-party-library-upgrades and https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#dependency-versions, you need to upgrade your Spring version to 5.x.
In your pom.xml, change
<spring.version>4.3.9.RELEASE</spring.version>
to
<spring.version>5.0.8.RELEASE</spring.version>
You might need to do some more changes for this migration of major spring version.

Instead of adding the parent as Spring Boot, have a dependency Management with Spring boot Bill of Materials.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
This way you don't have to a manually add the version numbers for each dependency.
Ex:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
</dependency>
You can view the dependency and version details from here.
http://central.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.0.2.RELEASE/spring-boot-dependencies-2.0.2.RELEASE.pom

Related

which dependencies to delete from Eclipse for maven project imported from Spring

can someone tell me which addictions I need to delete in Eclipse?It is a project imported from spring.
On the old workspace the program works but the pc crashes because it is a maven project in eclipse and I have 294 dependencies that are in contrast with each other. As it was an imported project from spring, the server was integrated and I was told that the unexecuted server had the new code, according to the stacktrace. So I created a new workspace with a dynamic web project, removed the methods from the controller and made a separate servlet for each method, with a separate jsp page, removing the annotations for the path and placing the references on the web. xml. With the new workspace the pc doesn't crash but the page doesn't work and the stacktrace doesn't tell me anything about what the problem is.
So I don't know what to do, whether to continue on the old workspace or the new one.
This is the pom:
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.giuggiola</groupId>
<artifactId>Parlamento</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>bootjpa</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>18</java.version>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.7.3</version>
<!--
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</exclusion>
</exclusions>
-->
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-expression -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.22</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<!-- <version>
5.0.1
</version> -->
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-elasticsearch -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<!-- <scope>runtime</scope> -->
<version>2.6.3</version> <!--$NO-MVN-MAN-VER$-->
</dependency>
<!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>7.7.0</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.17.0</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>8.0.0</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.apache.derby/derby
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>runtime</scope>
<version>10.15.2.0</version>
<scope>test</scope>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/com.google.guava/guava
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
</dependency>
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.6.2</version> <!--$NO-MVN-MAN-VER$-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-55</artifactId>
<version>2.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jasper -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper</artifactId>
<version>9.0.52</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-xml
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.12.4</version>
</dependency>
-->
<!--
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.9.Final</version>
</dependency>
-->
<!-- Thanks for using https://jar-download.com -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version> <!--$NO-MVN-MAN-VER$-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven</artifactId>
<version>1.18.20.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<!-- <version>2.6.4</version> -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.4</version>
<type>pom</type>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.maven/common-tomcat-maven-plugin -->
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>common-tomcat-maven-plugin</artifactId>
<version>2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.52</version>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
-->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>sources</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<!--
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<path>/</path>
<httpsPort>8443</httpsPort>
<keystoreFile>${basedir}/other/keystore.jks</keystoreFile>
<keystorePass>secret</keystorePass>
</configuration>
</plugin>
-->
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
mvn dependency:tree -Dverbose
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.giuggiola:Parlamento >----------------------
[INFO] Building bootjpa 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) # Parlamento ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] com.giuggiola:Parlamento:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.7.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.5.4:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.5.4:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.5.4:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.5:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.5:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.14.1:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.14.1:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.32:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.28:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.5.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.4:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.12.4:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.4:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.12.4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.5.4:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.52:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.9:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.3.9:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.9:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.9:compile
[INFO] | \- org.springframework:spring-context:jar:5.3.9:compile
[INFO] +- org.springframework:spring-expression:jar:5.3.22:compile
[INFO] | \- org.springframework:spring-core:jar:5.3.9:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.3.9:compile
[INFO] +- com.zaxxer:HikariCP:jar:4.0.3:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.32:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:2.6.3:compile
[INFO] | \- org.springframework.data:spring-data-elasticsearch:jar:4.2.4:compile
[INFO] | +- org.springframework:spring-tx:jar:5.3.9:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.5.4:compile
[INFO] | +- org.elasticsearch.plugin:transport-netty4-client:jar:7.12.1:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.1.67.Final:compile
[INFO] | | +- io.netty:netty-codec:jar:4.1.67.Final:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.67.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.67.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.67.Final:compile
[INFO] | | +- io.netty:netty-resolver:jar:4.1.67.Final:compile
[INFO] | | \- io.netty:netty-transport:jar:4.1.67.Final:compile
[INFO] | +- org.elasticsearch.client:elasticsearch-rest-high-level-client:jar:7.12.1:compile
[INFO] | | +- org.elasticsearch:elasticsearch:jar:7.12.1:compile
[INFO] | | | +- org.elasticsearch:elasticsearch-core:jar:7.12.1:compile
[INFO] | | | +- org.elasticsearch:elasticsearch-secure-sm:jar:7.12.1:compile
[INFO] | | | +- org.elasticsearch:elasticsearch-x-content:jar:7.12.1:compile
[INFO] | | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.12.4:compile
[INFO] | | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.12.4:compile
[INFO] | | | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.12.4:compile
[INFO] | | | +- org.elasticsearch:elasticsearch-geo:jar:7.12.1:compile
[INFO] | | | +- org.apache.lucene:lucene-core:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-analyzers-common:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-backward-codecs:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-grouping:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-highlighter:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-join:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-memory:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-misc:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-queries:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-queryparser:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-sandbox:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-spatial-extras:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-spatial3d:jar:8.8.0:compile
[INFO] | | | +- org.apache.lucene:lucene-suggest:jar:8.8.0:compile
[INFO] | | | +-org.elasticsearch:elasticsearch-cli:jar:7.12.1:compile
[INFO] | | | | \- net.sf.jopt-simple:jopt-simple:jar:5.0.2:compile
[INFO] | | | +- com.carrotsearch:hppc:jar:0.8.1:compile
[INFO] | | | +- joda-time:joda-time:jar:2.10.4:compile
[INFO] | | | +- com.tdunning:t-digest:jar:3.2:compile
[INFO] | | | +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] | | | +- org.elasticsearch:jna:jar:5.7.0-1:compile
[INFO] | | | \- org.elasticsearch:elasticsearch-plugin-classloader:jar:7.12.1:runtime
[INFO] | | +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.12.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore-nio:jar:4.4.14:compile
[INFO] | | +- org.elasticsearch.plugin:mapper-extras-client:jar:7.12.1:compile
[INFO] | | +- org.elasticsearch.plugin:parent-join-client:jar:7.12.1:compile
[INFO] | | +- org.elasticsearch.plugin:aggs-matrix-stats-client:jar:7.12.1:compile
[INFO] | | +- org.elasticsearch.plugin:rank-eval-client:jar:7.12.1:compile
[INFO] | | \- org.elasticsearch.plugin:lang-mustache-client:jar:7.12.1:compile
[INFO] | | \- com.github.spullara.mustache.java:compiler:jar:0.9.6:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.12.4:compile
[INFO] +- com.google.guava:guava:jar:19.0:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.6.2:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:2.5.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.5.4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.5.4:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.7:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.5.4:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.3.9:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.4.32.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.2.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.27.0-GA:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.22:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.2.3.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:compile
[INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.5:compile
[INFO] | | +- com.sun.istack:istack-commons-runtime:jar:3.0.12:compile
[INFO] | | \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.5.4:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.3.9:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.3.9:compile
[INFO] +- org.postgresql:postgresql:jar:42.2.23:runtime
[INFO] | \- org.checkerframework:checker-qual:jar:3.5.0:runtime
[INFO] +- com.vladmihalcea:hibernate-types-55:jar:2.14.0:compile
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.12.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.4:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] +- org.apache.tomcat:tomcat-jasper:jar:9.0.52:compile
[INFO] | +- org.apache.tomcat:tomcat-servlet-api:jar:9.0.52:compile
[INFO] | +- org.apache.tomcat:tomcat-juli:jar:9.0.52:compile
[INFO] | +- org.apache.tomcat:tomcat-jsp-api:jar:9.0.52:compile
[INFO] | +- org.apache.tomcat:tomcat-el-api:jar:9.0.52:compile
[INFO] | +- org.eclipse.jdt:ecj:jar:3.26.0:compile
[INFO] | +- org.apache.tomcat:tomcat-jasper-el:jar:9.0.52:compile
[INFO] | +- org.apache.tomcat:tomcat-api:jar:9.0.52:compile
[INFO] | \- org.apache.tomcat:tomcat-util-scan:jar:9.0.52:compile
[INFO] | \- org.apache.tomcat:tomcat-util:jar:9.0.52:compile
[INFO] +- org.apache.tomcat.embed:tomcat-embed-jasper:jar:9.0.52:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.52:compile
[INFO] | | \- org.apache.tomcat:tomcat-annotations-api:jar:9.0.52:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.52:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.22:provided
[INFO] +- org.projectlombok:lombok-maven:pom:1.18.20.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.5.4:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.5.4:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.5.4:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.5.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.4.7:test
[INFO] | | \- net.minidev:accessors-smart:jar:2.4.7:test
[INFO] | | \- org.ow2.asm:asm:jar:9.1:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | +- org.assertj:assertj-core:jar:3.19.0:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.2:test
[INFO] | +- org.mockito:mockito-core:jar:3.9.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.22:test
[INFO] | | \- org.objenesis:objenesis:jar:3.2:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.9.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:5.3.9:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.8.2:test
[INFO] +- org.springframework.boot:spring-boot-starter-parent:pom:2.6.4:compile
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.9.0:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | +- org.junit.platform:junit-platform-commons:jar:1.7.2:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] \- org.apache.tomcat.maven:common-tomcat-maven-plugin:jar:2.2:compile
[INFO] +- org.apache.maven:maven-plugin-api:jar:2.2.1:compile
[INFO] +- org.apache.maven:maven-project:jar:2.2.1:compile
[INFO] | +- org.apache.maven:maven-settings:jar:2.2.1:compile
[INFO] | +- org.apache.maven:maven-profile:jar:2.2.1:compile
[INFO] | +- org.apache.maven:maven-model:jar:2.2.1:compile
[INFO] | +- org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[INFO] | | +- org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[INFO] | | +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
[INFO] | | \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[INFO] | +- org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[INFO] | +- org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
[INFO] | +- org.apache.maven:maven-artifact:jar:2.2.1:compile
[INFO] | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO] | +- junit:junit:jar:4.13.2:compile
[INFO] | | \- org.hamcrest:hamcrest-core:jar:2.2:compile
[INFO] | \- classworlds:classworlds:jar:1.1-alpha-2:compile
[INFO] +- org.apache.maven:maven-archiver:jar:2.4.2:compile
[INFO] +- org.codehaus.plexus:plexus-archiver:jar:2.1.1:compile
[INFO] | \- org.codehaus.plexus:plexus-io:jar:2.0.3:compile
[INFO] +- commons-io:commons-io:jar:2.2:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | \- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] +- commons-codec:commons-codec:jar:1.15:compile
[INFO] \- commons-lang:commons-lang:jar:2.6:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
You should undo all your changes and fix the dependency mess.
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.giuggiola</groupId>
<artifactId>Parlamento</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>bootjpa</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>18</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</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-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-55</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
Should make the project work. There was a bunch of different versions for Spring, some weird plugin dependencies and imports of poms that aren't needed. I used the most recent version of Spring Boot 2.7.4 if you need something lower change the parent (and only change that nothing else).
As stated the problem wasn't Spring or the number of dependencies (well maybe it was) but removing Spring and doing everything manually with plain servlets and JSP isn't the solution.
As you apparently want (or use) JSP those will only work in a .war file not in a .jar file. If you want that you need to change the packaging to a war file and include the spring-boot-starter-tomcat dependency with a scope of provided.

java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.register(Ljava/lang/String;Ljava/lang/Class;)V

I have checked my project dependency and found the required class exists in xmlsec-1.5.8.jar and that is already included. Also from the dependency structure,i see it is not being overridden by any lower version. Still i am una ble to find the reason behing this exception. I am running spring boot 2.0.5
Can you please help me resolve the below issue -
Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.register(Ljava/lang/String;Ljava/lang/Class;)V
Dependency Tree
INFO] com.myproject.microservice:UserIDPasswordUpdate:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | +- net.minidev:json-smart:jar:2.3:test
[INFO] | | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.9.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.ws:spring-ws-core:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-xml:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:5.0.9.RELEASE:compile
[INFO] | \- commons-io:commons-io:jar:2.5:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:2.0.5.RELEASE:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.10.0:compile
[INFO] | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.10.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-jul:jar:2.10.0:compile
[INFO] | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.7.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.4:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.5.RELEASE:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] | \- org.springframework:spring-jdbc:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.0.9.RELEASE:compile
[INFO] +- com.h2database:h2:jar:1.4.197:compile
[INFO] +- com.oracle:ojdbc6:jar:11.2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.2.17.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.2.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.0.10.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.0.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.0.9.RELEASE:compile
[INFO] +- com.billdesk:billdesk:jar:1.0:system
[INFO] +- com.sun.xml.wss:xws-security:jar:3.0:compile
[INFO] | +- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] | +- javax.mail:mail:jar:1.4:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] | +- javax.xml.crypto:xmldsig:jar:1.0:compile
[INFO] | \- javax.xml.ws:jaxws-api:jar:2.1:compile
[INFO] +- javax.xml:jaxrpc-api:jar:1.1:compile
[INFO] +- org.apache.axis:axis-jaxrpc:jar:1.4:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.0.1:compile
[INFO] | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | +- asm:asm:jar:3.3.1:compile
[INFO] | +- org.apache.cxf:cxf-core:jar:3.0.1:compile
[INFO] | | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.0:compile
[INFO] | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.1.0:compile
[INFO] | +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.0.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.0.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.0.1:compile
[INFO] | \- org.apache.cxf:cxf-rt-ws-addr:jar:3.0.1:compile
[INFO] | \- org.apache.cxf:cxf-rt-ws-policy:jar:3.0.1:compile
[INFO] +- org.apache.cxf:cxf-rt-ws-security:jar:3.2.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-security-saml:jar:3.2.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-security:jar:3.2.5:compile
[INFO] | +- net.sf.ehcache:ehcache:jar:2.10.5:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.2:compile
[INFO] | | \- org.apache.wss4j:wss4j-ws-security-common:jar:2.2.2:compile
[INFO] | | +- org.opensaml:opensaml-saml-impl:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-profile-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-core:jar:3.3.0:compile
[INFO] | | | | \- io.dropwizard.metrics:metrics-core:jar:3.2.6:compile
[INFO] | | | +- org.opensaml:opensaml-saml-api:jar:3.3.0:compile
[INFO] | | | | +- org.opensaml:opensaml-xmlsec-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-soap-api:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-security-impl:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-security-api:jar:3.3.0:compile
[INFO] | | | | +- org.cryptacular:cryptacular:jar:1.1.1:compile
[INFO] | | | | \- org.bouncycastle:bcprov-jdk15on:jar:1.54:compile
[INFO] | | | +- org.opensaml:opensaml-xmlsec-impl:jar:3.3.0:compile
[INFO] | | | +- net.shibboleth.utilities:java-support:jar:7.3.0:compile
[INFO] | | | | \- com.google.guava:guava:jar:19.0:compile
[INFO] | | | \- commons-codec:commons-codec:jar:1.11:compile
[INFO] | | +- org.opensaml:opensaml-xacml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-api:jar:3.3.0:compile
[INFO] | | +- org.opensaml:opensaml-xacml-saml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-saml-api:jar:3.3.0:compile
[INFO] | | +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] | | \- org.apache.geronimo.javamail:geronimo-javamail_1.4_mail:jar:1.8.4:compile
[INFO] | +- org.apache.wss4j:wss4j-policy:jar:2.2.2:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.1.1:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.2:compile
[INFO] | | \- org.apache.wss4j:wss4j-bindings:jar:2.2.2:compile
[INFO] | \- org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.2.2:compile
[INFO] +- org.apache.ws.security:wss4j:jar:1.6.19:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.apache.santuario:xmlsec:jar:1.5.8:compile
[INFO] | \- org.opensaml:opensaml:jar:2.5.1-1:compile
[INFO] | \- org.opensaml:openws:jar:1.4.2-1:compile
[INFO] | \- org.opensaml:xmltooling:jar:1.3.2-1:compile
[INFO] | \- joda-time:joda-time:jar:2.9.9:compile
[INFO] +- javax.activation:activation:jar:1.1.1:compile
[INFO] \- org.apache.cxf:cxf-rt-bindings-soap:jar:3.0.1:compile
[INFO] +- org.apache.cxf:cxf-rt-wsdl:jar:3.0.1:compile
[INFO] | \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.0.1:compile
[INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2.10-b140310.1920:compile
[INFO] \- com.sun.xml.bind:jaxb-core:jar:2.2.10-b140310.1920:compile
POM.xml
<dependencies>
<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.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/oracle/ojdbc6 -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.billdesk</groupId>
<artifactId>billdesk</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/billdeskenc-1.0.jar</systemPath>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.wss4j/wss4j-ws-security-common -->
<!-- <dependency> <groupId>org.apache.wss4j</groupId> <artifactId>wss4j-ws-security-common</artifactId>
<version>2.0.3</version> </dependency> -->
<!-- -->
<dependency>
<groupId>com.sun.xml.wss</groupId>
<artifactId>xws-security</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/axis/axis-jaxrpc -->
<dependency>
<groupId>axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-frontend-jaxws -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.0.1</version>
<exclusions>
<exclusion>
<artifactId>cxf-rt-transports-http</artifactId>
<groupId>org.apache.cxf</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- excluding -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.6.19</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.activation/activation -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<!-- excluding -->
<!-- <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency> -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/xml-security/xmlsec -->
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.cxf
</groupId>
<artifactId>
cxf-codegen-plugin
</artifactId>
<versionRange>
[${org.apache.cxf.version},)
</versionRange>
<goals>
<goal>wsdl2java</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.0.4</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/cxf</source>
</sources>
</configuration>
</execution>
</executions>
<configuration>
<source>1.8</source>
<target>1.8</target>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdls/AccountInquiry.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
</plugin>
I have found the solution for the above mentioned issue and it was due to conflicting dependency issue. Incorporating several maven dependency for several issues or development was the reason behind is. What i finally did is declaring the cxf version on top of all other related dependency and referring that cxf version for all the related dependencies and finally worked!
<properties>
<cxf.version>2.7.14</cxf.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${cxf.version}</version>
</dependency>

Unable to use Spring Boot Data on Websphere traditional 8.5

I am trying to run a Spring Boot 1.5.9 application on Websphere 8.5.5.13 (class loading is parent last and I don't have shared library)
and when trying to call JpaRepository built in methods (I notice that the SQL query is being executed) but I am getting the following exception :
org.springframework.transaction.TransactionSystemException:
UOWManager transaction processing failed; nested exception is com.ibm.wsspi.uow.UOWException:
java.lang.LinkageError: com/ibm/websphere/uow/UOWSynchronizationRegistry.registerInterposedSynchronization
(Ljavax/transaction/Synchronization;)V (loaded from file:/D:/IBM/WebSphere/AppServer/plugins/com.ibm.ws.runtime.jar
by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader#873a9f67)
called from class org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter
(loaded from file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/D1SHLAPXXPWV1Node01Cell
/Spring.ear/SpringJSF.war/WEB-INF/lib/spring-tx-4.3.13.RELEASE.jar by
com.ibm.ws.classloader.CompoundClassLoader#7c146942[war:Spring/SpringJSF.war]
My pom file is as follows :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>SpringJSF</artifactId>
<version>1</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.15.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.15.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.2.jre8</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.9</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-servlet</artifactId>
<version>3.4.1.Final</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-config-prettyfaces</artifactId>
<version>3.4.1.Final</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
</dependencies>
<build>
<finalName>SpringJSF</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>-Dfile.encoding=UTF8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
My repository interface :
public interface EmployeeRepository extends JpaRepository<Employee, Long> {
#Query("from Employee u where u.userName = :userName")
Employee findByUserName(#Param("userName") String username);
}
Maven dependency tree:
[INFO] org.springframework:SpringJSF:war:1
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.5.9.RELEAS
E:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.9.RELEASE:comp
ile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.5.9.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.9.REL
EASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.9.R
ELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | \- org.springframework.boot:spring-boot-actuator:jar:1.5.9.RELEASE:com
pile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:1.5.9.RELEASE:c
ompile
[INFO] | +- org.springframework:spring-context:jar:4.3.13.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.3.13.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-context-support:jar:4.3.13.RELEASE:compi
le
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:1.5.9.RELEASE:co
mpile
[INFO] | \- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.5.9.RELEA
SE:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring4:jar:2.1.6.RELEASE:compile
[INFO] | | +- org.thymeleaf:thymeleaf:jar:2.1.6.RELEASE:compile
[INFO] | | | +- ognl:ognl:jar:3.0.8:compile
[INFO] | | | \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | \- nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:jar:1.4.0:compile
[INFO] | \- org.codehaus.groovy:groovy:jar:2.4.13:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.9.RELEASE:te
st
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.9.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.9.R
ELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.2.1:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | \- org.objenesis:objenesis:jar:2.1:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1
:test
[INFO] | +- org.springframework:spring-core:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.13.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.9.RELEASE:com
pile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.13.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.9.RELEAS
E:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.9.RELEASE:
compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.9.RELEASE
:compile
[INFO] | | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.23:compile
[INFO] | | | \- org.apache.tomcat:tomcat-juli:jar:8.5.23:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.3.13.RELEASE:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.11.9.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.13.9.RELEASE:
compile
[INFO] | | +- org.springframework:spring-orm:jar:4.3.13.RELEASE:compile
[INFO] | | +- org.springframework:spring-tx:jar:4.3.13.RELEASE:compile
[INFO] | | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.3.13.RELEASE:compile
[INFO] +- org.hibernate:hibernate-core:jar:4.2.15.Final:compile
[INFO] | +- antlr:antlr:jar:2.7.7:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar
:1.0.1.Final:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.2.Final:
compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:4.2.15.Final:compile
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:
compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.9.RELEAS
E:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.13.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.2.3.RELEA
SE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:4.2.3.RELE
ASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:
compile
[INFO] +- javax:javaee-api:jar:6.0:provided
[INFO] +- javax.el:javax.el-api:jar:3.0.0:provided
[INFO] +- com.microsoft.sqlserver:mssql-jdbc:jar:6.2.2.jre8:compile
[INFO] +- org.glassfish:javax.faces:jar:2.2.9:compile
[INFO] +- javax.enterprise:cdi-api:jar:1.2:compile
[INFO] | +- javax.interceptor:javax.interceptor-api:jar:1.2:compile
[INFO] | \- javax.inject:javax.inject:jar:1:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- org.primefaces:primefaces:jar:6.1:compile
[INFO] +- org.ocpsoft.rewrite:rewrite-servlet:jar:3.4.1.Final:compile
[INFO] +- org.ocpsoft.rewrite:rewrite-config-prettyfaces:jar:3.4.1.Final:compile
[INFO] | \- org.ocpsoft.rewrite:rewrite-integration-faces:jar:3.4.1.Final:compi
le
[INFO] +- commons-codec:commons-codec:jar:1.10:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- javax.mail:mail:jar:1.4.7:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- commons-validator:commons-validator:jar:1.6:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | +- commons-digester:commons-digester:jar:2.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] +- commons-io:commons-io:jar:2.5:compile
[INFO] \- joda-time:joda-time:jar:2.9.9:compile
NOTE: any dao method annotated with #Query works fine with no issues, my current issue is with JpaRepository built in methods like findAll, it doesn't work and produces the above exception.
UPDATE 1 : I tried marking the class loading to be parent first, and move all the jars from my application lib folder and put them in an isolated shared library, but this solution make the application started without springboot being initialized and neither hibernate nor jsf, so it's not working.
The maven depdencency tree shows that you have 2 transaction API's as dependencies:
javax.transaction-api
jboss-transaction-api_1.1_spec
and both have scope compile.
When you look at the lib folder of your war you should find
javax.transaction-api-1.2.jar
jboss-transaction-api_1.1_spec-1.0.1.Final.jar
You must ensure that both are not in the lib folder, because the com.ibm.websphere.uow.UOWSynchronizationRegistry is loaded from another class loader and this class loader also contains a version of the transaction api.
Try to use the dependencyManagement to set the dependency scopes to provided. E.g.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
The problem is most likely caused by a copy of the JTA API packaged in the application loader. That would cause the Spring transaction class and the WAS transaction class to link against separate copies of the JTA class, and the duplicate visibility from the Spring class (directly from the application loader, indirectly through the WAS class) causes the LinkageError at runtime.
This specific issue could likely be resolved by removing the JTA API from the application. You may also want to reconsider the use of PARENT_LAST, unless you are certain it's required for your application - while it has its uses, it also greatly increases the likelihood of LinkageErrors and ClassCastExceptions, among other things, if the application's contents are not very tightly controlled. A safer alternative might be a shared library with an isolated class loader, containing ONLY the specific libraries for which you need to bring your own implementation rather than simply using the version included in the server.

NoSuchMethodError when adding basic authentication in Spring Boot Soap Web service project

Collegues, i am trying to add basic authentication into my SOAP WS (Spring Boot Ppoject). POM lools like:
<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">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ws-signer</artifactId>
<packaging>jar</packaging>
<name>ws-signer</name>
<version>1.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.sourceJre>1.8</project.build.sourceJre>
<project.build.targetJre>1.8</project.build.targetJre>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>com.acap</groupId>
<artifactId>doc-signer</artifactId>
<version>1.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>1.16</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- spring-boot-maven-plugin -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- <dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.6.RELEASE</version>
</dependency>
</dependencies>-->
</plugin>
<!-- maven-jaxb2-plugin -->
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
<generateDirectory>${project.basedir}/src/main/java</generateDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
As i said I would like to add basic authentication to my soap web service.
As i understand i need to add next dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
But if i add this dependency and call mvn spring-boot:run than exception occured:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
instantiate interface
org.springframework.boot.SpringApplicationRunListener :
org.springframework.boot.context.event.EventPublishingRunListener at
org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:413)
at
org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:392)
at
org.springframework.boot.SpringApplication.getRunListeners(SpringApplication.java:378)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:291)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at
com.acap.DocSignerWsApplication.main(DocSignerWsApplication.java:16)
Caused by: org.springframework.beans.BeanInstantiationException:
Failed to instantiate
[org.springframework.boot.context.event.EventPublishingRunListener]:
Constructor threw exception; nested exception is
java.lang.NoSuchMethodError:
org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at
org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:409)
... 6 more Caused by: java.lang.NoSuchMethodError:
org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
at
org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:105)
at
org.springframework.boot.context.event.EventPublishingRunListener.(EventPublishingRunListener.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 7 more
Dependency tree is:
-- maven-dependency-plugin:2.10:tree (default-cli) # ws-signer ---
[INFO] org.springframework.boot:ws-signer:jar:1.0.1-SNAPSHOT
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.springframework.boot:spring-boot-starter-web-services:jar:1.5.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.8.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:1.5.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.8.RELEASE:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.23:compile
[INFO] | | | | \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.23:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.23:compile
[INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.23:compile
[INFO] | | +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
[INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
[INFO] | | +- org.springframework:spring-web:jar:4.3.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:4.3.12.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:4.3.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:4.3.12.RELEASE:compile
[INFO] | \- org.springframework.ws:spring-ws-core:jar:2.4.0.RELEASE:compile
[INFO] | \- org.springframework.ws:spring-xml:jar:2.4.0.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.8.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.8.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.8.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | | +- net.minidev:json-smart:jar:2.2.1:test
[INFO] | | | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] | | | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | \- org.objenesis:objenesis:jar:2.1:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:4.3.12.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.12.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:1.5.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.8.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.8.RELEASE:compile
[INFO] +- com.acap:doc-signer:jar:1.0-RELEASE:compile
[INFO] +- com.github.ulisesbocchio:jasypt-spring-boot-starter:jar:1.16:compile
[INFO] | \- com.github.ulisesbocchio:jasypt-spring-boot:jar:1.16:compile
[INFO] | \- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:1.5.8.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.3.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:4.3.12.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:4.3.12.RELEASE:compile
[INFO] | \- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.8.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.12.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
[INFO] \- commons-io:commons-io:jar:2.5:compile
UPDATE
I delete
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
and added
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>1.5.8.RELEASE</version>
</dependency>
Than I rewrite #Component which send mails.
UPDATE 2
Change places for dependencies:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
and
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
no dependcies tree looks like :
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.8.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.12.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
[INFO] \- commons-io:commons-io:jar:2.5:compile
Stacktrace (after spring-boot:run) is
17:14:42.118 ERROR [restartedMain] o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.selectInvocableMethod(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at com.acap.DocSignerWsApplication.main(DocSignerWsApplication.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.selectInvocableMethod(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:248)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:214)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:184)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
... 21 common frames omitted
I will be appriciate for any help.
UPDATE - DECISION
My problem was in the sequence of dependencies in the pom file.
It was necessary to raise <artifactId> spring-boot-starter-security </ artifactId> above (it should be near other dependenvies with org.springframework.boot group id).
The correct POM file in my case should look like this:
<dependencies>
<!-- spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>1.16</version>
</dependency>
<!-- other dependecies -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
In the dependency tree - Why spring-boot-starter-security-1.5.8.. shows under commons-io ?
[INFO] +- commons-io:commons-io:jar:2.5:compile [INFO]
\- org.springframework.boot:spring-boot-starter-security:jar:1.‌​5.8.RELEASE:compile
So the problem in your POM is dependency sequence.

can not launch cucumber simple test

I have Spring project. Now I try to launch simple cucumber test and got an error((( I thought this is because of Spring so I created separate project with next structure:
src/
|
| --main/
| --java/
| --cucumber/
| --CucumberRunner
| --features
| --MyFeatures.feature
| --StepDefinitions.java
And still I get the same error((
Caused by: java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException
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)
... 28 more
My Runner:
#RunWith(Cucumber.class)
#CucumberOptions(
format ={"pretty", "json:target/cucumber.json"},
features = {"src/main/java"}
)
public class CucumberRunner {
}
I know that path is incorrect here but I tried all possible combinations - the result is the same(((
My feature:
Feature: Testing my simple kickstarter project
Scenario: My first test
Given I navigate to Categories page
When When I enter 'f'
Then Error is displayed
My steps:
public class StepDefinitions {
#Given("^I navigate to Categories page$")
public void i_navigate_to_Categories_page() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
#When("^When I enter 'f'$")
public void when_I_enter_f() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
#Then("^Error is displayed$")
public void error_is_displayed() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
}
My pom.xml file:
<?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 ht
tp://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cucumber</groupId>
<artifactId>cucumber</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!--Cucumber jars-->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.42.0</version>
</dependency>
</dependencies>
PLease help. I checked google - no result on error((
Edit:
Result of mvn dependency:tree:
[INFO] cucumber:cucumber:jar:1.0-SNAPSHOT
[INFO] +- info.cukes:cucumber-java:jar:1.1.5:compile
[INFO] +- info.cukes:cucumber-testng:jar:1.1.5:compile
[INFO] | \- org.testng:testng:jar:6.8.7:compile
[INFO] | +- org.beanshell:bsh:jar:2.0b4:compile
[INFO] | \- com.beust:jcommander:jar:1.27:compile
[INFO] +- info.cukes:cucumber-junit:jar:1.1.5:compile
[INFO] | \- junit:junit:jar:4.11:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- info.cukes:cucumber-core:jar:1.1.5:compile
[INFO] +- info.cukes:cucumber-jvm-deps:jar:1.0.3:compile
[INFO] +- info.cukes:cucumber-html:jar:0.2.3:compile
[INFO] +- info.cukes:gherkin:jar:2.12.1:compile
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO] \- org.seleniumhq.selenium:selenium-server:jar:2.42.0:compile
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.48:compile
[INFO] +- org.bouncycastle:bcpkix-jdk15on:jar:1.48:compile
[INFO] +- mx4j:mx4j-tools:jar:3.0.1:compile
[INFO] +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile
[INFO] +- org.seleniumhq.selenium:jetty-repacked:jar:7.6.1:compile
[INFO] +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] +- org.seleniumhq.selenium:selenium-java:jar:2.42.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.42.0:compile
[INFO] | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.42.0:compile
[INFO] | | +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] | | +- org.json:json:jar:20080701:compile
[INFO] | | \- com.google.guava:guava:jar:15.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.42.0:compile
[INFO] | | +- net.sourceforge.htmlunit:htmlunit:jar:2.14:compile
[INFO] | | | +- xalan:xalan:jar:2.7.1:compile
[INFO] | | | | \- xalan:serializer:jar:2.7.1:compile
[INFO] | | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | | +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] | | | +- org.apache.httpcomponents:httpmime:jar:4.3.2:compile
[INFO] | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.14:compile
[INFO] | | | +- xerces:xercesImpl:jar:2.11.0:compile
[INFO] | | | | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.20:compile
[INFO] | | | +- net.sourceforge.cssparser:cssparser:jar:0.9.13:compile
[INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile
[INFO] | | | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | | | \- org.eclipse.jetty:jetty-websocket:jar:8.1.14.v20131031:compile
[INFO] | | | +- org.eclipse.jetty:jetty-util:jar:8.1.14.v20131031:compile
[INFO] | | | +- org.eclipse.jetty:jetty-io:jar:8.1.14.v20131031:compile
[INFO] | | | \- org.eclipse.jetty:jetty-http:jar:8.1.14.v20131031:compile
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.3.2:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.3.1:compile
[INFO] | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.42.0:compile
[INFO] | | +- commons-io:commons-io:jar:2.4:compile
[INFO] | | \- org.apache.commons:commons-exec:jar:1.1:compile
[INFO] | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.42.0:compile
[INFO] | | +- net.java.dev.jna:jna:jar:3.4.0:compile
[INFO] | | \- net.java.dev.jna:platform:jar:3.4.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-safari-driver:jar:2.42.0:compile
[INFO] | +- org.seleniumhq.selenium:selenium-support:jar:2.42.0:compile
[INFO] | | \- org.seleniumhq.selenium:selenium-api:jar:2.42.0:compile
[INFO] | \- org.webbitserver:webbit:jar:0.4.14:compile
[INFO] | \- io.netty:netty:jar:3.5.2.Final:compile
[INFO] +- org.yaml:snakeyaml:jar:1.8:compile
[INFO] \- commons-codec:commons-codec:jar:1.9:compile
EDIT: After Adding the next libraries:
<dependency>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-lgpl</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
<version>1.2.0</version>
</dependency>
Finally I can compile it but still my feature file can not see steps((
Test ignored.
Test ignored.
Test ignored.
Test ignored.
Test ignored.
Test ignored.Feature: Testing my simple kickstarter project
Scenario: My first test # features/myFeatures.feature:3
Given I navigate to Categories page
When When I enter 'f'
Then Error is displayed
1 Scenarios (1 undefined)
3 Steps (3 undefined)
0m0.000s
You can implement missing steps with the snippets below:
....
You are getting this error because you are missing a XML Pull parser library. You can add one with the following dependency in your POM. You will also need to add the Jdom library
<dependency>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>2.0.2</version>
</dependency>

Resources