We're updating the issue view to help you get more done. 

Hibernate ORM build fails on IBM JDK 8

Description

When building [1] Hibernate ORM on IBM JDK 8 thousands of tests fail with the same error:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 java.lang.annotation.AnnotationFormatError: java.lang.IllegalArgumentException: Wrong type at constant pool index at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:89) at java.lang.reflect.AccessibleObject.getAnnotationsFromCache(AccessibleObject.java:313) at java.lang.reflect.Executable.declaredAnnotations(Executable.java:606) at java.lang.reflect.Executable.getAnnotation(Executable.java:581) at java.lang.reflect.Method.getAnnotation(Method.java:643) at org.hibernate.service.internal.AbstractServiceRegistryImpl.applyInjections(AbstractServiceRegistryImpl.java:293) at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:283) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) at org.hibernate.boot.internal.SessionFactoryOptionsBuilder.interpretConnectionHandlingMode(SessionFactoryOptionsBuilder.java:599) at org.hibernate.boot.internal.SessionFactoryOptionsBuilder.<init>(SessionFactoryOptionsBuilder.java:433) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.<init>(SessionFactoryBuilderImpl.java:53) at org.hibernate.boot.internal.MetadataImpl.getSessionFactoryBuilder(MetadataImpl.java:153) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935) at org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase.buildEntityManagerFactory(BaseEntityManagerFunctionalTestCase.java:77) at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:277) at java.lang.Thread.run(Thread.java:812) Caused by: java.lang.IllegalArgumentException: Wrong type at constant pool index at sun.reflect.ConstantPool.getClassAt0(Native Method) at sun.reflect.ConstantPool.getClassAt(ConstantPool.java:49) at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:256) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:132) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:84) ... 26 more

I'm not yet sure if it is only build/test issue or also runtime issue.

[1]

1 2 3 4 5 6 7 8 echo -e '\ntest { ignoreFailures=true }' >> hibernate-core/hibernate-core.gradle echo -e '\ntest { ignoreFailures=true }' >> hibernate-agroal/hibernate-agroal.gradle echo -e '\ntest { ignoreFailures=true }' >> hibernate-c3p0/hibernate-c3p0.gradle echo -e '\ntest { ignoreFailures=true }' >> hibernate-ehcache/hibernate-ehcache.gradle echo -e '\ntest { ignoreFailures=true }' >> hibernate-envers/hibernate-envers.gradle echo -e '\ntest { ignoreFailures=true }' >> hibernate-proxool/hibernate-proxool.gradle ./gradlew -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Dcom.ibm.jsse2.overrideDefaultTLS=true" clean build --project-cache-dir=/tmp --continue -g local-home -x :hibernate-orm-modules:provision -x :hibernate-ehcache:test -x :hibernate-hikaricp:test -x :hibernate-jcache:test -x :hibernate-vibur:test -x :hibernate-osgi:test -x :documentation:test -x :hibernate-spatial:test -x :hibernate-testing:test

Environment

java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 8.0.5.30 - pxa6480sr5fp30-20190207_01(SR5 FP30))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20190124_408237 (JIT enabled, AOT enabled)
OpenJ9 - 9c77d86
OMR - dad8ba7
IBM - e2996d1)
JCL - 20190207_01 based on Oracle jdk8u201-b09

Status

Assignee

Unassigned

Reporter

Martin Šimka

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.9

Priority

Major