Announcement Announcement Module
Collapse
No announcement yet.
XStreamJsonStringWriter Exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XStreamJsonStringWriter Exception

    some articles (http://spring-json.sourceforge.net/bindingxstream.html) suggesting we can skip model attributes by setting

    Code:
    <beans>
        <bean name="jsonView" class="org.springframework.web.servlet.view.json.JsonView">
                <property name="jsonWriter"><ref bean="jsonWriter"/></property>
        </bean>
            
        <bean name="jsonWriter"  class="org.springframework.web.servlet.view.json.writer.xstream.XStreamJsonStringWriter"">
            <property name="enableAnnotationConf"><value>true</value></property>
        </bean>
    </beans>

    But when I see the doc there is no property called "enableAnnotationConf" in XStreamJsonStringWriter, hence the following exception.

    Code:
    Error setting property values; nested exception is org.
    opertyException: Invalid property 'enableAnnotationConf' of bean class [org.springframework.web.servlet.view.json.writer.xstream.XStreamJsonStringWriter].
    'enableAnnotationConf' is not writable or has an invalid setter method.
    Anybody I have idea how to make this work?

    Thanks in advance.

  • #2
    I found the solution

    updated jar from spring-json-1.2.jar to spring-json-1.2.1.jar

    Comment

    Working...
    X