Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError: org/hibernate/bytecode/internal/javassist/FieldHandler with hibernate 5.1 #86

Closed
yorl1n opened this issue Feb 11, 2016 · 7 comments
Milestone

Comments

@yorl1n
Copy link

yorl1n commented Feb 11, 2016

I have just updated jackson-datatype-hibernate5 to the version 2.7.1 and hibernate to v. 5.1.0.Final
and get the error: java.lang.NoClassDefFoundError: org/hibernate/bytecode/internal/javassist/FieldHandler
As I can see from commit
hibernate/hibernate-orm@472f4ab

the file org.hibernate.bytecode.internal.javassist.FieldHandler was removed.

Here is stacktrace:

Caused by: java.lang.NoClassDefFoundError: org/hibernate/bytecode/internal/javassist/FieldHandler
at com.fasterxml.jackson.datatype.hibernate5.HibernateAnnotationIntrospector.isIgnorableType(HibernateAnnotationIntrospector.java:82)
at com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.isIgnorableType(AnnotationIntrospectorPair.java:150)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.removeIgnorableTypes(BeanSerializerFactory.java:704)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:572)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:388)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:271)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:223)
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:157)
at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1215)
at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1167)
at com.fasterxml.jackson.databind.SerializerProvider._findExplicitUntypedSerializer(SerializerProvider.java:1136)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.hasSerializerFor(DefaultSerializerProvider.java:431)
at com.fasterxml.jackson.databind.ObjectMapper.canSerialize(ObjectMapper.java:2611)

@cowtowncoder
Copy link
Member

Thank you for reporting this. Looks like handling needs to be improved here. I assume 5.0.x of Hibernate still had this class... perhaps 5.1 has it moved to a different package.

@cowtowncoder
Copy link
Member

Hmmh. Ok. So no replacement. I wish I knew whether handling is needed for 5.0.x itself either.
But I guess changing code to optionally include this may not be too bad. Would just be nice to know if it was fully obsolete so could remove.

@heruan
Copy link

heruan commented Feb 17, 2016

Is this fixed in 2.7.1 or will it be in 2.7.2?

@cowtowncoder
Copy link
Member

@heruan It will be in 2.7.2.

@zhasulan
Copy link

I use HIBERNATE 5.2.4 and tried different versions of jackson-datatype-hibernate but the error is still present!

@yorl1n
Copy link
Author

yorl1n commented Nov 22, 2016

Do you use jackson-datatype-hibernate5 or jackson-datatype-hibernate? I use 5.2.4.Final and 2.8.4 and everything works properly.

@zhasulan
Copy link

I just realized this, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants