Issue Type: Bug Bug
Affects Versions: 1.3.1
Assignee: Joerg Schaible
Components: Converters
Created: 05/Sep/12 11:10 AM
Description:

Recently facing an issue with XStream which i'm using with Spring. We have a REST application where we are using XStream for marshalling & unmarshalling XML.
We have configured as shown below,

<bean id="xStreamMarshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="annotatedClasses">
<list><value>com.repobjects.OfflineOrderRepresentation</value></list>
</property>
<property name="autodetectAnnotations" value="true" />
</bean>

And this XStreamMarshaller is configured to HttpMessageconverter as shown,

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<util:list>
<bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
<property name="marshaller" ref="xStreamMarshaller" />
<property name="unmarshaller" ref="xStreamMarshaller" />
</bean>
</util:list>
</property>
</bean>

The issue here is when i post proper XML it should match to it's corresponding XStream annotated class "OfflineOrderRepresentation",
but that is happening randomly, some times i'm getting syntactically incorrect message, and issue is getting fixed randomly if i restart the server.

Below is the error logs i'm getting,

[org.springframework.http.converter.xml.MarshallingHttpMessageConverter@712625b0]
[org.springframework.web.bind.annotation.support.HandlerMethodInvoker]
Reading [com.repobjects.OfflineOrderRepresentation]
[org.springframework.http.converter.xml.MarshallingHttpMessageConverter@712625b0]
[org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver]
[controllers.OrderController@799a92d1]:
org.springframework.http.converter.HttpMessageNotReadableException: Could not read [class com.repobjects.OfflineOrderRepresentation];

Project: XStream
Priority: Major Major
Reporter: Ganesh Kandisa
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to