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

Failed to load class 'com.test.RequestInputs$Creator4JacksonDeserializerfce499b0': com.fasterxml.jackson.module.afterburner.deser.OptimizedValueInstantiator #136

Open
nikhildigde opened this issue Jun 2, 2021 · 2 comments

Comments

@nikhildigde
Copy link

Getting the below error while deserializing the inputs... com.fasterxml.jackson.module.afterburner.deser.OptimizedValueInstantiator class is however loading correctly (Class.forname works)... All the other required jars are in the classpath.. Any clue what is going wrong here? It works perfectly in other applications.

Caused by: java.lang.IllegalArgumentException: Failed to load class 'com.test.RequestInputs$Creator4JacksonDeserializerfce499b0': com.fasterxml.jackson.module.afterburner.deser.OptimizedValueInstantiator
at com.fasterxml.jackson.module.afterburner.util.MyClassLoader.loadAndResolve(MyClassLoader.java:96)
at com.fasterxml.jackson.module.afterburner.deser.CreatorOptimizer.createSubclass(CreatorOptimizer.java:93)
at com.fasterxml.jackson.module.afterburner.deser.CreatorOptimizer.createOptimized(CreatorOptimizer.java:64)
at com.fasterxml.jackson.module.afterburner.deser.DeserializerModifier.updateBuilder(DeserializerModifier.java:79)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:244)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
... 38 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.module.afterburner.deser.OptimizedValueInstantiator
at java.lang.ClassLoader.findClass(ClassLoader.java:523)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
at com.fasterxml.jackson.module.afterburner.util.MyClassLoader.loadAndResolve(MyClassLoader.java:90)
... 46 more
<Jun 2, 2021, 9:11:48,731 PM IDT> <|E |21:11:48 |Failed to load class 'com.test.RequestInputs$Creator4JacksonDeserializerfce499b0': com.fasterxml.jackson.module.afterburner.deser.OptimizedValueInstantiator

@nikhildigde
Copy link
Author

all deps on version 2.12.1

@cowtowncoder
Copy link
Member

I don't know what specifically fails, but the class in question looks like something Afterburner generates to call 0-argument constructor of com.test.RequestInputs class without using Reflection.
This class extends OptimizedValueInstantiator so that call to createUsingDefault() will construct a new instance.

So it may make sense to look into if there is anything special about RequestInputs class. And if possible, isolate a test for just that class with minimal getters/seters.

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

No branches or pull requests

2 participants