<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=janning" rel="nofollow">Janning Vygen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3449?redirect=false" rel="nofollow">SPR-3449</a></strong> and commented</p>
<p dir="auto">the binding of a list does not work in spring 2.0.4. The error is reproducable with the code below (including pom maven descriptor).<br>
The same code DOES work with spring 2.0.3 (you just need to change the pom if you use maven)</p>
<p dir="auto">// imports removed<br>
public class SimpleControllerTest extends TestCase {<br>
private SimpleController	controller;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public void testCorrectModel ( ) throws Exception {
	controller = new SimpleController();
	controller.setCommandClass(ListForm.class);
	MockHttpServletRequest req = new MockHttpServletRequest(&quot;POST&quot;, &quot;/myurl&quot;);
	MockHttpServletResponse res = new MockHttpServletResponse();
	req.addParameter(&quot;oks[0].ok&quot;, &quot;true&quot;);
	ModelAndView mav = controller.handleRequest(req, res);
	ListForm form = (ListForm) mav.getModelMap().get(&quot;command&quot;);
	Boolean ok = form.getOks().get(0).getOk();
	assertNotNull(ok);
}"><pre class="notranslate"><code class="notranslate">public void testCorrectModel ( ) throws Exception {
	controller = new SimpleController();
	controller.setCommandClass(ListForm.class);
	MockHttpServletRequest req = new MockHttpServletRequest("POST", "/myurl");
	MockHttpServletResponse res = new MockHttpServletResponse();
	req.addParameter("oks[0].ok", "true");
	ModelAndView mav = controller.handleRequest(req, res);
	ListForm form = (ListForm) mav.getModelMap().get("command");
	Boolean ok = form.getOks().get(0).getOk();
	assertNotNull(ok);
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">// imports removed<br>
public class SimpleController extends AbstractFormController<br>
{<br>
protected ModelAndView processFormSubmission ( HttpServletRequest req, HttpServletResponse resp, Object command, BindException err ) throws Exception {<br>
ModelAndView mav = new ModelAndView();<br>
mav.addObject("command", command);<br>
return mav;<br>
}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Override
protected ModelAndView showForm ( HttpServletRequest arg0, HttpServletResponse arg1, BindException arg2 ) throws Exception {
	return null;
}"><pre class="notranslate"><code class="notranslate">@Override
protected ModelAndView showForm ( HttpServletRequest arg0, HttpServletResponse arg1, BindException arg2 ) throws Exception {
	return null;
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">// imports removed<br>
public class Ok<br>
{<br>
Boolean ok;<br>
public Boolean getOk () {<br>
return ok;<br>
}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public void setOk ( Boolean ok ) {
	this.ok = ok;
}	"><pre class="notranslate"><code class="notranslate">public void setOk ( Boolean ok ) {
	this.ok = ok;
}	
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">// imports removed<br>
public class ListForm<br>
{<br>
private List&lt;Ok&gt; oks = new ArrayList&lt;Ok&gt;();</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public ListForm () {
	for( int index = 0; index &lt; 5; index++)	{
		Ok ok = new Ok();
		oks.add( ok );
	}
}

public List&lt;Ok&gt; getOks ( ) {
	return oks;
}

public void setOks ( List&lt;Ok&gt; oks ) {
	this.oks = oks;
}"><pre class="notranslate"><code class="notranslate">public ListForm () {
	for( int index = 0; index &lt; 5; index++)	{
		Ok ok = new Ok();
		oks.add( ok );
	}
}

public List&lt;Ok&gt; getOks ( ) {
	return oks;
}

public void setOks ( List&lt;Ok&gt; oks ) {
	this.oks = oks;
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
&lt;project&gt;<br>
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>
&lt;groupId&gt;test&lt;/groupId&gt;<br>
&lt;artifactId&gt;test&lt;/artifactId&gt;<br>
&lt;packaging&gt;jar&lt;/packaging&gt;<br>
&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;<br>
&lt;build&gt;<br>
&lt;plugins&gt;<br>
&lt;plugin&gt;<br>
&lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;<br>
&lt;configuration&gt;<br>
&lt;source&gt;1.5&lt;/source&gt;<br>
&lt;target&gt;1.5&lt;/target&gt;<br>
&lt;/configuration&gt;<br>
&lt;/plugin&gt;<br>
&lt;/plugins&gt;<br>
&lt;/build&gt;<br>
&lt;dependencies&gt;<br>
&lt;dependency&gt;<br>
&lt;groupId&gt;org.springframework&lt;/groupId&gt;<br>
&lt;artifactId&gt;spring&lt;/artifactId&gt;<br>
&lt;version&gt;2.0.4&lt;/version&gt;<br>
&lt;!--<br>
&lt;version&gt;2.0.3&lt;/version&gt;<br>
--&gt;<br>
&lt;/dependency&gt;<br>
&lt;dependency&gt;<br>
&lt;groupId&gt;junit&lt;/groupId&gt;<br>
&lt;artifactId&gt;junit&lt;/artifactId&gt;<br>
&lt;version&gt;3.8.1&lt;/version&gt;<br>
&lt;scope&gt;test&lt;/scope&gt;<br>
&lt;/dependency&gt;		&lt;dependency&gt;<br>
&lt;groupId&gt;org.springframework&lt;/groupId&gt;<br>
&lt;artifactId&gt;spring-mock&lt;/artifactId&gt;<br>
&lt;version&gt;2.0.4&lt;/version&gt;<br>
&lt;!--<br>
&lt;version&gt;2.0.3&lt;/version&gt;<br>
--&gt;<br>
&lt;scope&gt;test&lt;/scope&gt;<br>
&lt;/dependency&gt;<br>
&lt;/dependencies&gt;<br>
&lt;/project&gt;</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.4</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398077000" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8043" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8043/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8043">#8043</a> Error in BeanWrapperImpl.setPropertyValue for nested paths for primitive wrapper types such as integer (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=peter.dettman" rel="nofollow">Peter Dettman</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6041?redirect=false" rel="nofollow">SPR-6041</a></strong> and commented</p>
<p dir="auto">The Caucho hessian lib has now stabilised its v2.0 protocol and rounded up several regressions, with the release of v4.0.1 (<a href="http://caucho.com/download/hessian-4.0.1.jar" rel="nofollow">http://caucho.com/download/hessian-4.0.1.jar</a>).</p>
<p dir="auto">In 4.0.1, the HessianSkeleton class provides a ready-made invoke method that Spring's HessianExporter can call (instead of duplicating its code). I am attaching a patch that modifies HessianExporter.java to do so. The debugging output part of the code is still duplicated of necessity until some suitable refactoring of HessianSkeleton is done.</p>
<p dir="auto">As far as backward compatibility is concerned, I believe users should avoid using Hessian 2.0 protocol from previous versions (that may be an overly strict interpretation). Hessian 1.0 protocol should work fine with a v4.0.1 server. I understand that there could be problems if people are using HessianOutput/Hessian2Output or streaming versions directly.</p>
<p dir="auto">I recommend Caucho's Hessian 4.0.1 be used for Spring 3.0, a fresh start of sorts.</p>
<p dir="auto">See also:<br>
<a href="http://maillist.caucho.com/pipermail/hessian-interest/2009-June/000750.html" rel="nofollow">http://maillist.caucho.com/pipermail/hessian-interest/2009-June/000750.html</a> (and surrounding discussion on that list)<br>
<a href="http://jira.springframework.org/browse/SPR-5469" rel="nofollow">http://jira.springframework.org/browse/SPR-5469</a><br>
<a href="http://bugs.caucho.com/view.php?id=3646" rel="nofollow">http://bugs.caucho.com/view.php?id=3646</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M4</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15642/HessianExporter_401.patch" rel="nofollow">HessianExporter_401.patch</a> (<em>2.88 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398093127" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10142" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10142/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10142">#10142</a> Support Hessian 3.2.1</li>
</ul>
<p dir="auto">2 votes, 4 watchers</p>