在我的应用程序迁移到Scala 2.11.8和Java8并更新Spring和Hibernate到以下版本后:
<spring.version>4.3.2.RELEASE</spring.version>
<spring.asm.version>3.1.4.RELEASE</spring.asm.version>
<spring.ws.version>2.3.0.RELEASE</spring.ws.version>
<spring.security.version>4.1.2.RELEASE</spring.security.version>
<spring.data.version>1.10.2.RELEASE</spring.data.version>
<hibernate.version>5.2.2.Final</hibernate.version>
<hibernate.validator.version>5.2.4.Final</hibernate.validator.version>
<hibernate.jpa.version>1.0.0.Final</hibernate.jpa.version>
本地mvn clean install -U工作完全正常。如果我在TeamCity上运行构建,我会得到如下错误:
[warn] Error reading API from class file : java.lang.UnsupportedClassVersionError: org/hibernate/jdbc/ReturningWork : Unsupported major.minor version 52.0
[17:03:33][Step 3/3] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project app-jpa: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed.
我尝试用java-8-openjdk-amd64/
编译它有什么办法解决这个问题吗?
最好在我的情况下,我将JRE升级到最新版本,因为编译版本与运行版本不相同。