Serialize anonymous inner class extending abstract class in third party library

56 views
Skip to first unread message

Jeppe Langhoff Sørensen

unread,
Mar 27, 2017, 4:54:47 AM3/27/17
to protostuff
Hello,

I'm new to Protostuff and I'm trying to serialize a class with a class from a third party library. The class from the third party library has a field with a Map<SomeAbstractClass<?>, Object>. The SomeAbstractClass<T> is implemented in a number of anonymous inner classes in SomeAbstractClass<T>. When trying to serialize it I got a "Could not resolve constructor" exception message for SomeAbstractClass. 

How do I go about this?

Kind regards,
Jeppe

David Yu

unread,
Mar 27, 2017, 5:07:41 AM3/27/17
to protostuff
Try setting:
-Dprotostuff.runtime.always_use_sun_reflection_factory=true 

Kind regards,
Jeppe

--
You received this message because you are subscribed to the Google Groups "protostuff" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protostuff+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
When the cat is away, the mouse is alone.
- David Yu

Jeppe Langhoff Sørensen

unread,
Apr 3, 2017, 2:16:47 AM4/3/17
to protostuff
Trying that,

Thanks for the quick response.


Den mandag den 27. marts 2017 kl. 11.07.41 UTC+2 skrev David Yu:
On Mon, Mar 27, 2017 at 3:26 PM, Jeppe Langhoff Sørensen <jeppel...@gmail.com> wrote:
Hello,

I'm new to Protostuff and I'm trying to serialize a class with a class from a third party library. The class from the third party library has a field with a Map<SomeAbstractClass<?>, Object>. The SomeAbstractClass<T> is implemented in a number of anonymous inner classes in SomeAbstractClass<T>. When trying to serialize it I got a "Could not resolve constructor" exception message for SomeAbstractClass. 

How do I go about this?
Try setting:
-Dprotostuff.runtime.always_use_sun_reflection_factory=true 

Kind regards,
Jeppe

--
You received this message because you are subscribed to the Google Groups "protostuff" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protostuff+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages