You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dropwizard registers the jackson Afterburner module but doesn't give any way to customize its configuration. The Afterburner module provides the property _cfgUseValueClassLoader which can be set so that afterburner can deserialize protected / package visible properties. We've got some classes with package visible properties and when we try to serialize/deserialize them we get all sorts of warnings like below:
WARNING: Disabling Afterburner serialization for type class MyClass, field #1, due to access error (type java.lang.IllegalAccessError, message=mypackage/MyClass)
17:41:19.071 [ERROR] [system.err]
17:41:19.071 [ERROR] [system.err] java.lang.IllegalAccessError: mypackage/MyClass
Seems that dropwizard should either allow end users to control whether the after burner module is loaded or not via configuration and/or allow setting of its configuration properties.
The text was updated successfully, but these errors were encountered:
I did some digging and according to the documentation, the property should be on by default. And Dropwizard doesn't change that configuration. I'm curious how this error comes about.
In the upcoming 0.9.0 there will be support for setting a custom ObjectMapper without the Afterburner module during the bootstrap phase of an application. See #1112.
Thanks for looking into this, I'm wondering if maybe the afterburner module was not the culprit. I was running my app from gradle where the classpath consisted of jar files in the local cache, directories etc. (i.e. different code sources).
When we build our app we create a single JAR file and the warnings go away. I had suspected it was due to the afterburner settings done by dropwizard but wonder if there is some further limitation of having multiple code sources. It isn't immediately obvious to me what is actually causing the issue however. All of my application classes are in a single directory code source on the classpath at the time I was encountering the error.
Dropwizard registers the jackson Afterburner module but doesn't give any way to customize its configuration. The Afterburner module provides the property _cfgUseValueClassLoader which can be set so that afterburner can deserialize protected / package visible properties. We've got some classes with package visible properties and when we try to serialize/deserialize them we get all sorts of warnings like below:
WARNING: Disabling Afterburner serialization for type class MyClass, field #1, due to access error (type java.lang.IllegalAccessError, message=mypackage/MyClass)
17:41:19.071 [ERROR] [system.err]
17:41:19.071 [ERROR] [system.err] java.lang.IllegalAccessError: mypackage/MyClass
Seems that dropwizard should either allow end users to control whether the after burner module is loaded or not via configuration and/or allow setting of its configuration properties.
The text was updated successfully, but these errors were encountered: