JDK 11 Unable to instantiate default tuplizer

Description

There is two spring boot project. Their names are "core" and "resurgence".
Resurgence project include core (with maven).

Core project successfully running on jdk11. But Resurgence not.

There was an entity which name is "Group" from "core" project. It include "authorities" field and annotatied by "@Column( unique = true, nullable = false )".
When the code reach here org.hibernate.tuple.entity.EntityMetamodel:295

"tuplizerClassName" is null and going here

org.hibernate.tuple.entity.EntityTuplizerFactory:41

if "authorities" field without any annotation there is no error.

Activity

Show:

Guillaume Smet August 29, 2018 at 3:29 PM

Not an issue with ORM, just an issue of using an older stack with JDK 11.

Guillaume Smet August 29, 2018 at 3:28 PM

So the issue is with Javassist 3.22 which does not support JDK 11. That's why you have this exception, if you have the same one as Fabio.

Frankly, the Spring Boot version you are using is not really suitable for JDK 11.

The next version of Spring Boot should come with ORM 5.3 which supports JDK 11. You can maybe try to upgrade to it by setting the right property to a 5.3 version but I'm not sure it will work very well.

If this error is the only one you have, you can probably fix it by upgrading Javassist to 3.23 but we didn't test 5.2 with JDK 11 so I can't guarantee you won't have any other problem.

Fabio tested forcing the Javassist version and at least your project works with that.

Fabio Massimo Ercoli August 29, 2018 at 2:58 PM

I tried to reproduce the case. Once I added the jax-b runtime maven dependency, I've got this exception:

Caused by: java.lang.NullPointerException
at javassist.util.proxy.SecurityActions.setAccessible (SecurityActions.java:103)
at javassist.util.proxy.DefineClassHelper.toClass3 (DefineClassHelper.java:151)
at javassist.util.proxy.DefineClassHelper.toClass2 (DefineClassHelper.java:134)
at javassist.util.proxy.DefineClassHelper.toClass (DefineClassHelper.java:95)
at javassist.util.proxy.FactoryHelper.toClass (FactoryHelper.java:131)
at javassist.util.proxy.ProxyFactory.createClass3 (ProxyFactory.java:530)
at javassist.util.proxy.ProxyFactory.createClass2 (ProxyFactory.java:515)
at javassist.util.proxy.ProxyFactory.createClass1 (ProxyFactory.java:451)
at javassist.util.proxy.ProxyFactory.createClass (ProxyFactory.java:422)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate (JavassistProxyFactory.java:75)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory (PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init> (AbstractEntityTuplizer.java:156)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init> (PojoEntityTuplizer.java:58)

Halil, could you confirm that is the one you have too? Thanks

Former user August 23, 2018 at 9:21 AM

I create spring boot project for testing. I explained the project in readme

https://github.com/haibbi/hibernate-jdk11-test

Guillaume Smet August 23, 2018 at 8:01 AM

Could you provide a self contained test case reproducing the issue?

One without Spring Boot based on our test case template would be nice: https://github.com/hibernate/hibernate-test-case-templates/tree/master/orm/hibernate-orm-5 .

If you can't reproduce it with our test case template, I would be interested in a Spring Boot example anyway.

Thanks!

Rejected

Details

Assignee

Reporter

Labels

Worked in

Components

Affects versions

Priority

Created August 22, 2018 at 11:58 PM
Updated August 29, 2018 at 3:29 PM
Resolved August 29, 2018 at 3:29 PM