Hi,
we're trying to use Tomcat Session serialization into Redis. The de/serialization process is failing because we save into Session some of our config classes that are part of our Wicket web module.
The problem is that part of the data is SpringBean
annotated field in one of the classes. Wicket uses it's own component injector that handles de/serialization process for those beans bean into proxy by calling the Spring code in org/springframework/core/SerializableTypeWrapper.java:126
. Wicket @SpringBean
annotation allows de/serialization of the fields by using the mentioned code.
I can see that it creates a proxy that implements following classes
Class<?>[] interfaces = new Class<?>[] {type, SerializableTypeProxy.class, Serializable.class};
But when the session is deserialized we get following exception. We debugged the code and found the problematic non-public interface is SerializableTypeProxy
. I'd like ask if the class could be made public to fix the issues we have?
```
Caused by: java.lang.IllegalArgumentException: non-public interface is not defined by the given loader
at java.base/java.lang.reflect.Proxy$ProxyBuilder.mapToModule(Proxy.java:818)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.
Comment From: oliverhenlich
Seems similar to this issue https://github.com/spring-projects/spring-data-redis/issues/2016
Comment From: jhoeller
What's the actual ClassLoader this is getting deserialized into? In that target ClassLoader arrangement, where are the Spring classes defined - in a parent ClassLoader, I assume?
Declaring SerializableTypeProxy
is not entirely simple since it and its TypeProvider
delegate are nested interfaces in the non-public SerializableTypeWrapper
. We'd have to move it to a top-level public type itself which we are rather reluctant to do.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.