Failed CustomerViewRepositoryIntegrationTest
PolukovY opened this issue · comments
step to reproduce:
- git clone the repo
- ./mvnw clean install
expected:
- All tests passed
actual result: - build failed
[INFO] order-history-backend .............................. FAILURE [ 2.519 s]
The same when doing it via idea.
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]: Unresolvable class definition; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/KotlinDetector
The issue with dependencies
./mvnw test dependency:tree -DskipTests=true
extract the part that case the issue
[INFO] eventuate.tram.examples.customers.and.orders:common-swagger:jar:0.1.0-SNAPSHOT
[INFO] \- io.eventuate.util:eventuate-util-spring-swagger:jar:0.4.0.RELEASE: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.5:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | | \- net.bytebuddy:byte-buddy:jar:1.8.12: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.4.0: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:spring-beans:jar:4.0.9.RELEASE:compile
[INFO] | | +- org.springframework:spring-context:jar:4.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:4.0.9.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0: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
[INFO] \- org.springframework.boot:spring-boot-starter-web:jar:1.4.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.4.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.4.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.7.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.7.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.springframework:spring-core:jar:4.3.9.RELEASE:compile`
expected:
- spring-code:5.2.5.RELEASE
actual:
- spring-code:4.3.22.RELEASE
Thanks. The maven build accidentally references a SNAPSHOT dependency. It's possible that this is why the build passed at one point on the CI server.
A couple of issues:
build-and-test-all-mysql-maven.sh
was not running the complete set of tests so this problem was hidden- Maven dependency resolution was resolving to an older versions of some artifacts (spring-core, spring-boot-*), resulting in an inconsistent set of dependencies