Deal of the Day

Home » Main » Manning Forums » 2008 » Spring in Practice

Thread: Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Pages: 1 - Last Post: Dec 7, 2009 1:50 PM by:

Posts: 24
Registered: 4/13/09
Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder
Posted: Nov 28, 2009 2:40 PM
  Click to reply to this thread Reply

I use the code on the page 288

protected void initBinder(ServletRequestDataBinder binder) {
new ByteArrayMultipartFileEditor());

and get the following exception with the org.springframework.web.bind.ServletRequestDataBinder

java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder] for @InitBinder method: protected void

What is missing?

Posts: 24
Registered: 4/13/09
Re: Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder
Posted: Nov 28, 2009 4:33 PM   in response to: in response to:
  Click to reply to this thread Reply

It shall use org.springframework.web.bind.WebDataBinder as the argument instead. So, that code is not working for Spring 3.0.


Posts: 64
From: earth
Registered: 9/28/08
Re: Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder
Posted: Dec 7, 2009 8:40 AM   in response to: in response to:
  Click to reply to this thread Reply

I suspect much of the delay on this MEAP is the fact the authors started writing it for Spring 2.5 and are now trying to upgrade to 3.0. It wouldn't make sense to publish this book now or next year, if it didn't cover 3.0.

Posts: 24
Registered: 4/13/09
Re: Unsupported argument [org.springframework.web.bind.ServletRequestDataBinder
Posted: Dec 7, 2009 1:50 PM   in response to: bbaron in response to: bbaron
  Click to reply to this thread Reply

If my memory serves me correctly, the authors had set their goal for this book to cover Spring 3.0 which was stated somewhere in the book. The Spring core used to have a very good backward compatibility. This case is totally out of my experience with Spring. The Spring non-core projects such as Spring Security is the other story. The new Spring Security 3.0 is not compatible with the 2.0 based on my experience/headache.

Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor