Closed framilano closed 6 months ago
It seems that Groovy 4.x doesn't work with JDK 21. I can't find any compatibility matrix other than this link
It seems that Groovy 4.x doesn't work with JDK 21. I can't find any compatibility matrix other than this link
I even tried updating manually to groovy alpha versions 5.0.0 released in December, no luck, kinda weird that there's still no real support for an LTS version of Java after 4 months, no?
Have you tried updating manually to groovy 5 alpha in Spring Cloud Contract and that didn't help?
Have you tried updating manually to groovy 5 alpha in Spring Cloud Contract and that didn't help?
Exactly, same issue
I tried with this (looking at dependency analyzer in Intellij)
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-json</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-nio</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-xml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-json</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-nio</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-xml</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>5.0.0-alpha-4</version>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-nio</artifactId>
<version>5.0.0-alpha-4</version>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-xml</artifactId>
<version>5.0.0-alpha-4</version>
</dependency>
Still no luck
@framilano Can you confirm that executing mvn dependency:tree
on your updated code
lists a version of org.ow2.asm:asm:jar
which is 9.5
and above?
In the same output, you shall be able to see the tree from where the incorrect ASM jar is being still pulled in.
As for a hit and trial(without being able to actually execute the project) can you see if this kinda helps
...
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<version>4.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<version>4.1.0</version>
<scope>test</scope>
</dependency>
<!--Explicitly override the asm dependency resolution-->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.6</version>
</dependency>
...
@marcingrzejszczak Just to add slightly more information, independently adding the mentioned spring dependencies spring-cloud-contract-verifier
and spring-cloud-starter-contract-stub-runner
brings in the outdated version os asm via this tree:
[INFO] | +- com.toomuchcoding.jsonassert:jsonassert:jar:0.7.0:test
[INFO] | | +- com.jayway.jsonpath:json-path:jar:2.8.0:test
[INFO] | | +- net.minidev:json-smart:jar:2.5.0:test
[INFO] | | | \- net.minidev:accessors-smart:jar:2.5.0:test
[INFO] | | | \- org.ow2.asm:asm:jar:9.3:test
@namannigam There's noorg.ow2.asm:asm:jar
in my dependencies tree, I checked with mvn dependency:tree
I tried your suggested pom dependencies but still, same exact result.
@framilano In that case, if not the exact group and artifact, there could be some other resolution of the asm
in your tree for sure which is where the ClassReader
would get loaded from and without which groovy cannot generate the byte code. But it would be helpful if you could share a "minimal, complete and verifiable example" (MCVE
@namannigam I'm an idiot, actually there's org.ow2.asm
in my dependencies tree (I was checking the wrong project, here's my dependency tree). Anyway, even with the updated asm to 9.6, still no difference.
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:3.2.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:3.2.1:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:3.2.1:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:3.2.1:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:3.2.1:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.21.1:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.21.1:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:2.0.9:compile
[INFO] | | \- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:3.2.1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.15.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.15.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.15.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:3.2.1:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty-http:jar:1.1.14:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-common:jar:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-transport:jar:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-codec:jar:4.1.104.Final:compile
[INFO] | | | \- io.netty:netty-handler:jar:4.1.104.Final:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.1.104.Final:compile
[INFO] | | +- io.netty:netty-resolver-dns:jar:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-resolver:jar:4.1.104.Final:compile
[INFO] | | | \- io.netty:netty-codec-dns:jar:4.1.104.Final:compile
[INFO] | | +- io.netty:netty-resolver-dns-native-macos:jar:osx-x86_64:4.1.104.Final:compile
[INFO] | | | \- io.netty:netty-resolver-dns-classes-macos:jar:4.1.104.Final:compile
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.104.Final:compile
[INFO] | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.104.Final:compile
[INFO] | | | \- io.netty:netty-transport-classes-epoll:jar:4.1.104.Final:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty-core:jar:1.1.14:compile
[INFO] | | \- io.netty:netty-handler-proxy:jar:4.1.104.Final:compile
[INFO] | | \- io.netty:netty-codec-socks:jar:4.1.104.Final:compile
[INFO] | +- org.springframework:spring-web:jar:6.1.2:compile
[INFO] | \- org.springframework:spring-webflux:jar:6.1.2:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.4.14:compile
[INFO] | \- org.slf4j:slf4j-api:jar:2.0.9:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.4.14:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:3.2.1:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:3.2.1:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:3.2.1:compile
[INFO] | +- io.micrometer:micrometer-observation:jar:1.12.1:compile
[INFO] | | \- io.micrometer:micrometer-commons:jar:1.12.1:compile
[INFO] | \- io.micrometer:micrometer-jakarta9:jar:1.12.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:3.2.1:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:3.2.1:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.2.1:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.8.0:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.1:test
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.2:test
[INFO] | +- net.minidev:json-smart:jar:2.5.0:test
[INFO] | | \- net.minidev:accessors-smart:jar:2.5.0:test
[INFO] | +- org.assertj:assertj-core:jar:3.24.2:test
[INFO] | | \- net.bytebuddy:byte-buddy:jar:1.14.10:test
[INFO] | +- org.awaitility:awaitility:jar:4.2.0:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.10.1:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.10.1:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.10.1:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.10.1:test
[INFO] | +- org.mockito:mockito-core:jar:5.7.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.14.10:test
[INFO] | | \- org.objenesis:objenesis:jar:3.3:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:5.7.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:6.1.2:compile
[INFO] | | \- org.springframework:spring-jcl:jar:6.1.2:compile
[INFO] | +- org.springframework:spring-test:jar:6.1.2:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.9.1:test
[INFO] +- org.springframework.boot:spring-boot-starter-data-mongodb:jar:3.2.1:compile
[INFO] | +- org.mongodb:mongodb-driver-sync:jar:4.11.1:compile
[INFO] | \- org.springframework.data:spring-data-mongodb:jar:4.2.1:compile
[INFO] | +- org.springframework:spring-tx:jar:6.1.2:compile
[INFO] | +- org.springframework:spring-context:jar:6.1.2:compile
[INFO] | | \- org.springframework:spring-aop:jar:6.1.2:compile
[INFO] | +- org.springframework:spring-expression:jar:6.1.2:compile
[INFO] | \- org.springframework.data:spring-data-commons:jar:3.2.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-mongodb-reactive:jar:3.2.1:compile
[INFO] | \- io.projectreactor:reactor-core:jar:3.6.1:compile
[INFO] +- org.mongodb:mongodb-driver-reactivestreams:jar:4.11.1:compile
[INFO] | +- org.mongodb:bson:jar:4.11.1:compile
[INFO] | +- org.mongodb:mongodb-driver-core:jar:4.11.1:compile
[INFO] | | \- org.mongodb:bson-record-codec:jar:4.11.1:runtime
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.13.0:compile
[INFO] +- de.codecentric:spring-boot-admin-starter-client:jar:3.1.8:compile
[INFO] | \- de.codecentric:spring-boot-admin-client:jar:3.1.8:compile
[INFO] +- joda-time:joda-time:jar:2.12.5:compile
[INFO] +- io.micrometer:micrometer-registry-prometheus:jar:1.12.0:compile
[INFO] | +- io.micrometer:micrometer-core:jar:1.12.1:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:runtime
[INFO] | | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] | \- io.prometheus:simpleclient_common:jar:0.16.0:compile
[INFO] | \- io.prometheus:simpleclient:jar:0.16.0:compile
[INFO] | +- io.prometheus:simpleclient_tracer_otel:jar:0.16.0:compile
[INFO] | | \- io.prometheus:simpleclient_tracer_common:jar:0.16.0:compile
[INFO] | \- io.prometheus:simpleclient_tracer_otel_agent:jar:0.16.0:compile
[INFO] +- io.rest-assured:rest-assured:jar:5.3.1:compile
[INFO] | +- org.apache.groovy:groovy:jar:4.0.16:compile
[INFO] | +- org.apache.groovy:groovy-xml:jar:4.0.16:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.16.0:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.13:compile
[INFO] | +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:compile
[INFO] | +- io.rest-assured:json-path:jar:5.3.2:compile
[INFO] | | \- io.rest-assured:rest-assured-common:jar:5.3.2:compile
[INFO] | \- io.rest-assured:xml-path:jar:5.3.2:compile
[INFO] +- org.codehaus.janino:janino:jar:3.1.11:compile
[INFO] | \- org.codehaus.janino:commons-compiler:jar:3.1.11:compile
[INFO] +- com.sndyuk:logback-more-appenders:jar:1.8.8:compile
[INFO] +- io.jsonwebtoken:jjwt-api:jar:0.11.5:compile
[INFO] +- io.jsonwebtoken:jjwt-impl:jar:0.11.5:runtime
[INFO] +- io.jsonwebtoken:jjwt-jackson:jar:0.11.5:runtime
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.15.3:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.15.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.15.3:compile
[INFO] +- junit:junit:jar:4.13.2:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] +- io.projectreactor:reactor-test:jar:3.6.1:test
[INFO] +- de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring3x:jar:4.12.0:test
[INFO] | \- de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:4.12.0:test
[INFO] | +- de.flapdoodle.embed:de.flapdoodle.embed.process:jar:4.10.1:test
[INFO] | | +- de.flapdoodle.reverse:de.flapdoodle.reverse:jar:1.7.2:test
[INFO] | | | +- de.flapdoodle.graph:de.flapdoodle.graph:jar:1.3.3:test
[INFO] | | | | \- org.jgrapht:jgrapht-core:jar:1.4.0:test
[INFO] | | | | \- org.jheaps:jheaps:jar:0.11:test
[INFO] | | | \- de.flapdoodle.java8:de.flapdoodle.java8:jar:1.4.2:test
[INFO] | | +- org.apache.commons:commons-compress:jar:1.25.0:test
[INFO] | | +- net.java.dev.jna:jna:jar:5.13.0:test
[INFO] | | +- net.java.dev.jna:jna-platform:jar:5.13.0:test
[INFO] | | \- de.flapdoodle:de.flapdoodle.os-api:jar:1.4.1:test
[INFO] | \- de.flapdoodle.embed:de.flapdoodle.embed.mongo.packageresolver:jar:4.11.0:test
[INFO] | \- de.flapdoodle:de.flapdoodle.os:jar:1.5.3:test
[INFO] +- org.springframework.cloud:spring-cloud-contract-verifier:jar:4.1.0:test
[INFO] | +- org.springframework.cloud:spring-cloud-contract-spec:jar:4.1.0:test
[INFO] | | +- org.springframework.cloud:spring-cloud-contract-spec-java:jar:4.1.0:test
[INFO] | | | \- dk.brics:automaton:jar:1.12-4:test
[INFO] | | \- org.springframework.cloud:spring-cloud-contract-spec-groovy:jar:4.1.0:test
[INFO] | +- org.springframework.cloud:spring-cloud-contract-shade:jar:4.1.0:test
[INFO] | +- org.apache.commons:commons-text:jar:1.11.0:test
[INFO] | +- javax.inject:javax.inject:jar:1:test
[INFO] | +- com.github.tomakehurst:wiremock-jre8-standalone:jar:2.35.1:test
[INFO] | +- com.toomuchcoding.jsonassert:jsonassert:jar:0.7.0:test
[INFO] | +- org.apache.maven.resolver:maven-resolver-api:jar:1.9.18:test
[INFO] | +- com.rackspace.eclipse.webtools.sourceediting:org.eclipse.wst.xml.xpath2.processor:jar:2.1.100:test
[INFO] | | +- edu.princeton.cup:java-cup:jar:10k:test
[INFO] | | \- com.ibm.icu:icu4j:jar:4.6:test
[INFO] | +- org.apache.groovy:groovy-nio:jar:4.0.16:test
[INFO] | +- org.apache.groovy:groovy-json:jar:4.0.16:compile
[INFO] | +- com.github.jknack:handlebars:jar:4.3.1:test
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.4:test
[INFO] | | \- commons-collections:commons-collections:jar:3.2.2:test
[INFO] | +- org.yaml:snakeyaml:jar:2.2:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.15.3:test
[INFO] | +- net.javacrumbs.json-unit:json-unit-assertj:jar:2.38.0:test
[INFO] | | +- net.javacrumbs.json-unit:json-unit-core:jar:2.38.0:test
[INFO] | | \- net.javacrumbs.json-unit:json-unit-json-path:jar:2.38.0:test
[INFO] | \- org.junit.jupiter:junit-jupiter-api:jar:5.10.1:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | +- org.junit.platform:junit-platform-commons:jar:1.10.1:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] +- org.springframework.cloud:spring-cloud-starter-contract-stub-runner:jar:4.1.0:test
[INFO] | +- org.springframework.cloud:spring-cloud-contract-stub-runner:jar:4.1.0:test
[INFO] | | +- org.springframework.cloud:spring-cloud-contract-converters:jar:4.1.0:test
[INFO] | | +- org.eclipse.jgit:org.eclipse.jgit:jar:6.6.1.202309021850-r:test
[INFO] | | | \- com.googlecode.javaewah:JavaEWAH:jar:1.2.3:test
[INFO] | | +- org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:jar:6.7.0.202309050840-r:test
[INFO] | | | +- com.jcraft:jsch:jar:0.1.55:test
[INFO] | | | \- com.jcraft:jzlib:jar:1.1.3:test
[INFO] | | +- com.jcraft:jsch.agentproxy.sshagent:jar:0.0.9:test
[INFO] | | | \- com.jcraft:jsch.agentproxy.core:jar:0.0.9:test
[INFO] | | +- com.jcraft:jsch.agentproxy.jsch:jar:0.0.9:test
[INFO] | | \- com.jcraft:jsch.agentproxy.usocket-jna:jar:0.0.9:test
[INFO] | +- org.springframework.cloud:spring-cloud-contract-wiremock:jar:4.1.0:test
[INFO] | | +- jakarta.servlet:jakarta.servlet-api:jar:6.0.0:test
[INFO] | | +- org.apache.httpcomponents.client5:httpclient5:jar:5.2.3:test
[INFO] | | | +- org.apache.httpcomponents.core5:httpcore5:jar:5.2.4:test
[INFO] | | | \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.2.4:test
[INFO] | | \- org.springframework.cloud:spring-cloud-test-support:jar:4.1.0:test
[INFO] | | +- org.apache.maven.resolver:maven-resolver-connector-basic:jar:1.9.16:test
[INFO] | | | +- org.apache.maven.resolver:maven-resolver-spi:jar:1.9.16:test
[INFO] | | | \- org.apache.maven.resolver:maven-resolver-util:jar:1.9.16:test
[INFO] | | +- org.apache.maven.resolver:maven-resolver-impl:jar:1.9.16:test
[INFO] | | | \- org.apache.maven.resolver:maven-resolver-named-locks:jar:1.9.16:test
[INFO] | | +- org.apache.maven:maven-resolver-provider:jar:3.9.5:test
[INFO] | | | +- org.apache.maven:maven-model:jar:3.9.5:test
[INFO] | | | +- org.apache.maven:maven-model-builder:jar:3.9.5:test
[INFO] | | | | +- org.codehaus.plexus:plexus-interpolation:jar:1.26:test
[INFO] | | | | +- org.apache.maven:maven-artifact:jar:3.9.5:test
[INFO] | | | | \- org.apache.maven:maven-builder-support:jar:3.9.5:test
[INFO] | | | \- org.apache.maven:maven-repository-metadata:jar:3.9.5:test
[INFO] | | \- org.apache.maven.resolver:maven-resolver-transport-http:jar:1.9.16:test
[INFO] | \- org.sonatype.sisu:sisu-inject-plexus:jar:2.6.0:test
[INFO] | +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test
[INFO] | +- org.codehaus.plexus:plexus-classworlds:jar:2.5.2:test
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.18:test
[INFO] | +- org.sonatype.sisu:sisu-inject-bean:jar:2.6.0:test
[INFO] | | +- javax.enterprise:cdi-api:jar:1.0:test
[INFO] | | | \- javax.annotation:jsr250-api:jar:1.0:test
[INFO] | | +- org.sonatype.sisu:sisu-guice:jar:no_aop:3.2.5:test
[INFO] | | | \- com.google.guava:guava:jar:16.0.1:test
[INFO] | | \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0:test
[INFO] | \- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0:test
[INFO] +- org.ow2.asm:asm:jar:9.6:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.2.8.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.2.8.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:4.1.0:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-context:jar:4.1.0:compile
[INFO] | | | \- org.springframework.security:spring-security-rsa:jar:1.1.1:compile
[INFO] | | | \- org.bouncycastle:bcprov-jdk18on:jar:1.74:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-aop:jar:3.2.1:compile
[INFO] | | | \- org.aspectj:aspectjweaver:jar:1.9.21:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-sleuth-core:jar:2.2.8.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.9.21:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-context-slf4j:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-messaging:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-rpc:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.16.0:compile
[INFO] | | | \- io.zipkin.brave:brave-instrumentation-http:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-streams:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.16.0:compile
[INFO] | | | \- io.zipkin.brave:brave-instrumentation-servlet:jar:5.16.0:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-jms:jar:5.16.0:compile
[INFO] | | \- io.zipkin.reporter2:zipkin-reporter-metrics-micrometer:jar:2.16.3:compile
[INFO] | \- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.2.8.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:4.1.0:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:6.2.1:compile
[INFO] | +- io.zipkin.zipkin2:zipkin:jar:2.23.2:compile
[INFO] | +- io.zipkin.reporter2:zipkin-reporter:jar:2.16.3:compile
[INFO] | +- io.zipkin.reporter2:zipkin-reporter-brave:jar:2.16.3:compile
[INFO] | +- io.zipkin.reporter2:zipkin-sender-kafka:jar:2.16.3:compile
[INFO] | +- io.zipkin.reporter2:zipkin-sender-activemq-client:jar:2.16.3:compile
[INFO] | \- io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.16.3:compile
[INFO] \- org.springframework:spring-beans:jar:6.1.2:compile
[INFO] ---------------------------------------------------------
Were you guys able to figure this out?
I had to add the following groovy dep to fix this
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
....
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>4.0.19</version>
</dependency>
</dependencies>
</plugin>
...
@davidmelia is there a problem with the Groovy version we're bringing in by default?
@davidmelia is there a problem with the Groovy version we're bringing in by default?
Even in the latest version spring-cloud-contract-verifier:4.1.2
, yes, the groovy version 4.0.16 is brought in with spring-cloud-contract-parent
, as seen here.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-bom</artifactId>
<version>4.0.16</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
I've bumped the Groovy dep to the latest version. Hopefully that fixes any issues
Any chance for a backport to 3.x branch?
Environment:
Description: The issue appears while generating tests using
spring-cloud-contract-verifier
, it only happens with Java21, reverting to Java17 fixes it. I can easily reproduce the issue doingmvn clean package
, here's the stacktrace (I had to hide a bunch of paths for privacy reasons):The strange thing is that simply packaging the application three times solves the issue. First
mvn package
generates the same exception, the second one too, the third one too, the fourth one is fixed. I see in /target that even if the exception is thrown the stubs get created correctly, obviously doing amvn clean
resets the situation. Here's my dependencies:Here's my plugins configuration:
Every single dependency is up-to-date, I tried to manually update inside the POM every outdated dependency present in spring-cloud-contract-verifier but with no success. Any idea on what is happening? Is java21 simply not supported right now?