Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.4.7
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
JDK version and platform:1.7.0_71
Description
Same issue I raised on Git: https://github.com/maurotalevi/xstream/issues/1
I am upgrading xStream 1.2 to xStream 1.4.8
I get the following error on application startup:
Caused by: java.lang.NoSuchFieldError: serializationMembers
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.(AbstractReflectionConverter.java:62)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.(reflection:ReflectionConverter.java):8)
at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.(AnnotationReflectionConverter.java:49)
... 37 more
It seems a code bug (in version 1.4.8). AbstractReflectionConverter class accesses serializationMembers field member of serializationMethodInvoker class, serializationMembers is moved to util package in 1.4.8 but access modifier is still default. Which could be an issue because AbstractReflectionConverter and SerializationMethodInvoker both are in the same package but SerializationMembers is in a different package, so access modifier should be changed to public or it should be accessed using getter methods.
AbstractReflectionConverter.Java:
Line 62: serializationMembers = serializationMethodInvoker.serializationMembers;
SerializationMethodInvoker.Java
Line 30: SerializationMembers serializationMembers = new SerializationMembers();
As per documentation this class has been moved to util package. nt
Please let me know if my understanding is correct or doing anything wrong here.
Activity
Field | Original Value | New Value |
---|---|---|
Resolution | Not A Bug [ 6 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Actually I simply guess you have still an old version of XSteam on the classpath. How would we ever had a chance to compile this and run all unit tests? BTW, nothing has been moved regarding the API, the old classes have just been deprecated and call now the stuff at the new location.