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

XStreamMarshaller doesn't set the converterRegistry field with XStream 1.4.5 [SPR-11147] #15774

spring-projects-issues opened this issue Dec 4, 2013 · 3 comments
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression


Copy link

Tomas Repel opened SPR-11147 and commented

When using XStreamMarshaller, I get following error

XStream marshalling ended with exception org.springframework.oxm.MarshallingFailureException: XStream marshalling exception;
nested exception is com.thoughtworks.xstream.converters.ConversionException: No converter specified for class springtest.xmlmarshalling.Data

After some debugging, I think the problem is that XStreamMarshaller's converterRegistry field is not initialized (it remains NULL, unlike the converterLookup field just a line above) and when the XStream object is being created in constructXStream() method, the NULL value causes that no converter is registered.

Let me know if you need more details or example war to reproduce this.

Affects: 4.0 RC2

Referenced from: commits 26d1438

Copy link
Collaborator Author

Phil Webb commented

Is this a problem that you are also seeing in 3.2.x or is it a 4.0 regression?

If you could submit a repro project for this, that would be very useful.

Copy link
Collaborator Author

Tomas Repel commented

I believe this is regression for Spring 4.0. PR for reproducer: spring-attic/spring-framework-issues#63

Copy link
Collaborator Author

Juergen Hoeller commented

This seems to be an XStream 1.4.5 specific problem. Before, XStream checked the given ConverterLookup object whether it also implements ConverterRegistry...

this.converterRegistry = converterRegistry != null
? converterRegistry
: (converterLookup instanceof ConverterRegistry
? (ConverterRegistry)converterLookup
: null);

But as of 1.4.5, it just assigns the converterRegistry reference as provided. We'll fix this for Spring 4.0 GA, hopefully compatible with XStream 1.4.x and also 1.4.5 then.

@spring-projects-issues spring-projects-issues added type: regression A bug that is also a regression in: data Issues in data modules (jdbc, orm, oxm, tx) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
None yet

No branches or pull requests

2 participants