mrtux
September 22, 2023, 11:58am
1
I just updated to Hibernate 6.3.1 (from 6.2.8) and building my project with maven does not work any more, because multiple classes are missing (e.g., jakarta.xml.bind.JAXBException
and org.antlr.v4.runtime.ANTLRErrorListener
). I’m using hibernate-jpamodelgen .
My solution was to explicitly add org.antlr/antlr4-runtime and jakarta.xml.bind/jakarta.xml.bind-api to my pom.xml . Shouldn’t these packages be automatically required by hibernate-core or am I missing somehting else?
beikov
September 22, 2023, 2:26pm
2
Are you also using the hibernate-jpamodelgen
artifact to generate the static metamodel?
beikov
September 22, 2023, 2:33pm
3
For reference, this was reported before and we discussed it here: https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user/topic/Hibernate.206.2E3.20requires.20extra.20antlr4.20runtime
It seems Maven handles transitive dependencies for annotation processor JARs strangely. A potential fix is to change the scope of the dependencies in gradle from implementation
to api
in here: https://github.com/hibernate/hibernate-orm/blob/main/tooling/metamodel-generator/hibernate-jpamodelgen.gradle
We’d very much appreciate if you could contribute this fix and verify that it actually also works.
ghuber
September 24, 2023, 8:46am
4
Hello, I am having the same issue
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile(run-annotation-processors-only) on project myProject Fatal error compiling: java.lang.NoClassDefFoundError: org/antlr/v4/runtime/ANTLRErrorListener:
I use hibernate-commons-annotations and hibernate-jpamodelgen
Adding antlr4-runtime did fix it.
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.10.1</version>
</dependency>
…if I use the latest I get this message
ANTLR Tool version 4.10.1 used for code generation does not match the current runtime version 4.13.1
So I guess I need to use 4.10.1.
Cheers
As of 4 december 2023 this bug remains unsolved. I too get the message ‘ANTLR Tool version 4.13.0 used for code generation does not match the current runtime version 4.10.1’ on two occasions. But despite these warnings Hibernate/Spring JPA is still able to query the database. So if this version mismatch has any serious implications for me. I am using hibernate core 6.4.0.Final.
I’ve tried the solutions above. I’ve explicitly added antlr4-runtime 4.10.1 as a pom dependency while at the same time excluding version 4.13 using
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
in the dependency xml of hibernate-core.
But none of this has any effect. I still get the error ‘ANTLR Tool version 4.13.0 used for code generation does not match the current runtime version 4.10.1’
I am using Maven so i can’t use the Gradle specific solution proposed by Beikov. Please fix this bug.
beikov
December 4, 2023, 10:28am
6
You shouldn’t need an explicit antlr4 dependency with 6.4.0.Final anymore. Also see [HHH-17362] - Hibernate JIRA
I don’t know about the warning, but that is probably related to your setup. Hibernate ORM 6.4 uses Antlr 4.13 and ORM 6.3 uses Antlr 4.10.1. Maybe you have a messed up configuration or a different dependency that depends on Antlr 4.10.1.
mrtux
December 4, 2023, 12:02pm
7
An explicit antlr4 dependency is still required with Hibernate 6.4.0 when used with maven!
beikov
December 6, 2023, 1:24pm
8
If that’s the case, then please try to create a reproducer application and attach it to a newly created bug ticket in our issue tracker(https://hibernate.atlassian.net ).
mrtux
December 6, 2023, 4:52pm
9
1 Like
Hi Beikov,
I’ve just upgraded the dependencies hibernate-search-backend-elasticsearch-aws and hibernate-search-backend-lucene to 7.0.0.FINAL
and hibernate-hikaricp and hibernate-core to 6.4.0.FINAL. But I still get the warnings
ANTLR Tool version 4.10.1 used for code generation does not match the current runtime version 4.13.0
ANTLR Runtime version 4.10.1 used for parser compilation does not match the current runtime version 4.13.0
ANTLR Tool version 4.10.1 used for code generation does not match the current runtime version 4.13.0
ANTLR Runtime version 4.10.1 used for parser compilation does not match the current runtime version 4.13.0
Hibernate.version tag is also set to 6.4.0.FINAL
Regards
EDIT:
here’s the dependency tree of my project
[INFO] +- software.amazon.awssdk:translate:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:aws-json-protocol:jar:2.21.35:compile
[INFO] | | \- software.amazon.awssdk:third-party-jackson-core:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:protocol-core:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:http-auth-aws:jar:2.21.35:compile
[INFO] | | +- software.amazon.awssdk:checksums-spi:jar:2.21.35:compile
[INFO] | | \- software.amazon.awssdk:checksums:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:sdk-core:jar:2.21.35:compile
[INFO] | | +- software.amazon.awssdk:profiles:jar:2.21.35:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] | +- software.amazon.awssdk:auth:jar:2.21.35:compile
[INFO] | | \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO] | +- software.amazon.awssdk:http-auth-spi:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:http-auth:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:identity-spi:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:http-client-spi:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:regions:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:annotations:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:utils:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:aws-core:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:metrics-spi:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:json-utils:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:endpoints-spi:jar:2.21.35:compile
[INFO] | +- software.amazon.awssdk:apache-client:jar:2.21.35:runtime
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.16.0:compile
[INFO] | \- software.amazon.awssdk:netty-nio-client:jar:2.21.35:runtime
[INFO] | +- io.netty:netty-codec-http:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-codec-http2:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-codec:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-transport:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-common:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-buffer:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-handler:jar:4.1.101.Final:compile
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.101.Final:compile
[INFO] | +- io.netty:netty-transport-classes-epoll:jar:4.1.101.Final:compile
[INFO] | \- io.netty:netty-resolver:jar:4.1.101.Final:compile
[INFO] +- software.amazon.awssdk:sns:jar:2.21.35:compile
[INFO] | \- software.amazon.awssdk:aws-query-protocol:jar:2.21.35:compile
[INFO] +- software.amazon.awssdk:ec2:jar:2.21.35:compile
[INFO] +- org.hibernate.search:hibernate-search-mapper-orm:jar:7.0.0.Final:compile
[INFO] | +- org.hibernate.search:hibernate-search-engine:jar:7.0.0.Final:compile
[INFO] | +- org.hibernate.search:hibernate-search-mapper-pojo-base:jar:7.0.0.Final:compile
[INFO] | +- org.hibernate.search:hibernate-search-util-common:jar:7.0.0.Final:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
[INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:6.0.6.Final:compile
[INFO] | +- io.smallrye:jandex:jar:3.1.2:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.5.3.Final:compile
[INFO] | \- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.1:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:2.1.2:compile
[INFO] +- org.hibernate.orm:hibernate-core:jar:6.4.0.Final:compile
[INFO] | +- com.fasterxml:classmate:jar:1.6.0:compile
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.14.10:runtime
[INFO] | +- org.glassfish.jaxb:jaxb-runtime:jar:4.0.4:runtime
[INFO] | | \- org.glassfish.jaxb:jaxb-core:jar:4.0.4:runtime
[INFO] | | +- org.glassfish.jaxb:txw2:jar:4.0.4:runtime
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:4.1.2:runtime
[INFO] | +- jakarta.inject:jakarta.inject-api:jar:2.0.1:runtime
[INFO] | \- org.antlr:antlr4-runtime:jar:4.13.0:compile
[INFO] +- software.amazon.awssdk:ssm:jar:2.21.35:compile
[INFO] +- org.hibernate.search:hibernate-search-backend-elasticsearch-aws:jar:7.0.0.Final:compile
[INFO] | \- org.hibernate.search:hibernate-search-backend-elasticsearch:jar:7.0.0.Final:compile
[INFO] | +- org.elasticsearch.client:elasticsearch-rest-client:jar:8.10.4:compile
[INFO] | | +- org.apache.httpcomponents:httpasyncclient:jar:4.1.5:compile
[INFO] | | \- org.apache.httpcomponents:httpcore-nio:jar:4.4.16:compile
[INFO] | +- org.elasticsearch.client:elasticsearch-rest-client-sniffer:jar:8.10.4:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.15.3:compile
[INFO] +- com.amazonaws:aws-java-sdk-s3:jar:1.12.603:compile
[INFO] | +- com.amazonaws:aws-java-sdk-kms:jar:1.12.603:compile
[INFO] | +- com.amazonaws:aws-java-sdk-core:jar:1.12.603:compile
[INFO] | | +- software.amazon.ion:ion-java:jar:1.0.2:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.15.3:compile
[INFO] | | \- joda-time:joda-time:jar:2.8.1:compile
[INFO] | \- com.amazonaws:jmespath-java:jar:1.12.603:compile
[INFO] +- net.ttddyy:datasource-proxy:jar:1.9:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:3.2.0:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.16:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.16:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:10.1.16:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:3.2.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:3.2.0:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:3.2.0:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:3.2.0:compile
[INFO] | | +- org.springframework:spring-core:jar:6.1.1:compile
[INFO] | | | \- org.springframework:spring-jcl:jar:6.1.1:compile
[INFO] | | \- org.yaml:snakeyaml:jar:2.2:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:3.2.0:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:3.2.0:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.15.3:compile
[INFO] | +- io.micrometer:micrometer-observation:jar:1.12.0:compile
[INFO] | | \- io.micrometer:micrometer-commons:jar:1.12.0:compile
[INFO] | \- io.micrometer:micrometer-jakarta9:jar:1.12.0:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.12.0:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:runtime
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- com.github.ben-manes.caffeine:caffeine:jar:3.1.8:compile
[INFO] | +- org.checkerframework:checker-qual:jar:3.37.0:compile
[INFO] | \- com.google.errorprone:error_prone_annotations:jar:2.21.1:compile
[INFO] +- commons-io:commons-io:jar:2.15.1:compile
[INFO] +- com.google.guava:guava:jar:32.1.3-jre:compile
[INFO] | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | \- com.google.j2objc:j2objc-annotations:jar:2.8:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.14.0:compile
[INFO] +- com.google.code.gson:gson:jar:2.10.1:compile
[INFO] +- org.passay:passay:jar:1.6.4:compile
[INFO] +- com.stripe:stripe-java:jar:21.9.0:compile
[INFO] +- org.javamoney:moneta:pom:1.4.2:compile
[INFO] | +- org.javamoney.moneta:moneta-core:jar:1.4.2:compile
[INFO] | +- org.javamoney.moneta:moneta-convert:jar:1.4.2:compile
[INFO] | +- org.javamoney.moneta:moneta-convert-imf:jar:1.4.2:compile
[INFO] | +- org.javamoney.moneta:moneta-convert-ecb:jar:1.4.2:compile
[INFO] | +- javax.money:money-api:jar:1.1:compile
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- dev.failsafe:failsafe:jar:3.3.2:compile
[INFO] +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- com.opencsv:opencsv:jar:5.9:compile
[INFO] | +- org.apache.commons:commons-text:jar:1.11.0:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- org.hibernate.search:hibernate-search-backend-lucene:jar:7.0.0.Final:compile
[INFO] | +- org.apache.lucene:lucene-core:jar:9.8.0:compile
[INFO] | +- org.apache.lucene:lucene-analysis-common:jar:9.8.0:compile
[INFO] | +- org.apache.lucene:lucene-queryparser:jar:9.8.0:compile
[INFO] | | \- org.apache.lucene:lucene-queries:jar:9.8.0:compile
[INFO] | +- org.apache.lucene:lucene-join:jar:9.8.0:compile
[INFO] | +- org.apache.lucene:lucene-facet:jar:9.8.0:compile
[INFO] | +- com.carrotsearch:hppc:jar:0.9.1:compile
[INFO] | \- org.apache.lucene:lucene-highlighter:jar:9.8.0:compile
[INFO] | \- org.apache.lucene:lucene-memory:jar:9.8.0:runtime
[INFO] +- jakarta.servlet:jakarta.servlet-api:jar:6.0.0:provided
[INFO] +- javaxt:javaxt-core:jar:1.7.8:compile
[INFO] +- org.jsoup:jsoup:jar:1.17.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:3.2.0:compile
[INFO] | +- org.springframework:spring-aop:jar:6.1.1:compile
[INFO] | | \- org.springframework:spring-beans:jar:6.1.1:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:6.2.0:compile
[INFO] | | +- org.springframework.security:spring-security-core:jar:6.2.0:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:6.2.0:compile
[INFO] | | \- org.springframework:spring-context:jar:6.1.1:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:6.2.0:compile
[INFO] | \- org.springframework:spring-expression:jar:6.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:3.2.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:3.2.0:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.20.1:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:3.2.0:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:3.2.0:compile
[INFO] | | +- org.springframework:spring-orm:jar:6.1.1:compile
[INFO] | | \- org.springframework:spring-tx:jar:6.1.1:compile
[INFO] | \- org.springframework:spring-aspects:jar:6.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:3.2.0:compile
[INFO] | \- org.hibernate.validator:hibernate-validator:jar:8.0.1.Final:compile
[INFO] | \- jakarta.validation:jakarta.validation-api:jar:3.0.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:3.2.0:compile
[INFO] | +- org.springframework:spring-context-support:jar:6.1.1:compile
[INFO] | \- org.eclipse.angus:jakarta.mail:jar:2.0.2:compile
[INFO] | \- org.eclipse.angus:angus-activation:jar:2.0.1:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:3.2.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:3.2.0:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.15.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.15.3:compile
[INFO] | +- org.springframework:spring-web:jar:6.1.1:compile
[INFO] | \- org.springframework:spring-webmvc:jar:6.1.1:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:2.0.9:compile
[INFO] | \- org.slf4j:slf4j-api:jar:2.0.9:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:3.2.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.21.1:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.21.1:compile
[INFO] | \- org.apache.logging.log4j:log4j-jul:jar:2.21.1:compile
[INFO] +- org.apache.logging.log4j:log4j-web:jar:2.22.0:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.21.1:compile
[INFO] +- com.github.dfabulich:sitemapgen4j:jar:1.1.2:compile
[INFO] +- org.hibernate.orm:hibernate-hikaricp:jar:6.4.0.Final:compile
[INFO] | \- com.zaxxer:HikariCP:jar:5.0.1:compile
[INFO] +- io.jsonwebtoken:jjwt-api:jar:0.12.3:compile
[INFO] +- io.jsonwebtoken:jjwt-impl:jar:0.12.3:runtime
[INFO] +- io.jsonwebtoken:jjwt-jackson:jar:0.12.3: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] +- org.springframework.boot:spring-boot-starter-jdbc:jar:3.2.0:compile
[INFO] | \- org.springframework:spring-jdbc:jar:6.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:3.2.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:3.2.0:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty-http:jar:1.1.13:compile
[INFO] | | +- io.netty:netty-resolver-dns:jar:4.1.101.Final:compile
[INFO] | | | \- io.netty:netty-codec-dns:jar:4.1.101.Final:compile
[INFO] | | +- io.netty:netty-resolver-dns-native-macos:jar:osx-x86_64:4.1.101.Final:compile
[INFO] | | | \- io.netty:netty-resolver-dns-classes-macos:jar:4.1.101.Final:compile
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.101.Final:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty-core:jar:1.1.13:compile
[INFO] | | \- io.netty:netty-handler-proxy:jar:4.1.101.Final:compile
[INFO] | | \- io.netty:netty-codec-socks:jar:4.1.101.Final:compile
[INFO] | \- org.springframework:spring-webflux:jar:6.1.1:compile
[INFO] | \- io.projectreactor:reactor-core:jar:3.6.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:3.2.0:compile
[INFO] | \- org.thymeleaf:thymeleaf-spring6:jar:3.1.2.RELEASE:compile
[INFO] | \- org.thymeleaf:thymeleaf:jar:3.1.2.RELEASE:compile
[INFO] | +- org.attoparser:attoparser:jar:2.0.7.RELEASE:compile
[INFO] | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] +- com.mysql:mysql-connector-j:jar:8.2.0:compile
[INFO] +- software.amazon.awssdk:elasticloadbalancingv2:jar:2.21.35:compile
[INFO] \- software.amazon.awssdk:sesv2:jar:2.21.35:compile
It lists antlr org.antlr:antlr4-runtime:jar:4.13.0:compile
beikov
December 8, 2023, 8:10am
11
I would suggest you set a break point into org.antlr.v4.runtime.RuntimeMetaData#checkVersion
and check which parser/lexer it is that is generated with version 4.10.1. I’m sure it’s not Hibernate ORM, but from the looks of your class path, I can’t really point my finger on anything specific.
Hello Beikov,
Thanks for the suggestion. I was able to isolate the cause of the problem. Apparently the spring-boot-starter-data-jpa dependency still uses 4.10.0 whereas hibernate uses 4.13.0.
I’ve tried excluding the antlr dependency using the tag in the pom and explicitly adding antlr 4.13.0 as a dependency like so:
<!-- https://mvnrepository.com/artifact/org.springframework/springloaded -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.13.0</version>
</dependency>
But maven seems to ignore this because 4.10.0 is still in the classpath. I’ve cleaned and rebuild the maven project before checking. Do you have any suggestions how to solve this problem?
beikov
December 8, 2023, 2:14pm
13
Yeah, report that as a bug against Spring and wait until there is a new Spring Boot version released.
@Beikov , i think spring jpa is using 4.13.0 now that i’ve explicitly excluded the 4.10.0 from its dependencies. The warning is still thrown because they’ve hardedcoded the version “4.10.1” into the class org.data.jpa.repository.query.HqlLexer and also similar classes
RuntimeMetaData.checkVersion("4.10.1", "4.10.1");
So despite the persisting warning, i think my problem is solved. Thanks for the help and i’ll report the bug.
beikov
December 8, 2023, 3:11pm
15
I don’t know why the hell Spring create its own lexer for HQL and uses an older Antlr version than Hibernate ORM, but you should be complaining about this in the Spring forums.