wood burning stoves 2.0*
The moose likes Spring and the fly likes The Validator is not Validating!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "The Validator is not Validating!!" Watch "The Validator is not Validating!!" New topic
Author

The Validator is not Validating!!

Gary Marshall
Ranch Hand

Joined: Feb 19, 2007
Posts: 121
All:

I am working through the script Developing a Spring Framework MVC Application step-by-step.

I am sure this issues has been brought up many times and I have found many postings using Google but I have yet to find the solution to the problem I am having.

I am at Chapter 4 "Developing the Web Interface", and have completed all of the coding to add a PriceIncrease form as is stated in Step 4.5 "Adding a form, found here

When I export the WAR file containing all of these changes and deploy to Tomcat and then test by going to ....http://localhost:8080/springapp/priceincrease.htm, I get the following error:

java.lang.IllegalStateException: Cannot convert value of type [springapp.service.PriceIncreaseValidator] to required type [org.springframework.validation.Validator] for property 'validator': no matching editors or conversion strategy found
.... etc and so on...

I am simply trying to find out what I am doing wrong here and I cannot find a solution anywhere. I'm thinking the problem could be that this script is using the Spring 2.5 API and I am trying to work through this script using the Spring 3.0.5 API. Also, since the script requires a tld file I grabbed one from a Spring 2.0 API.

Is this the case? Am I having this "validator" issue because I am mixing versions of the API? If not, can someone please let me know how to fix this problem? Could there be another, more recent script that I can use, that employes the more current Spring MVC API that I could use to learn from?

Thanks to all for your time and assistance
Gary



G
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1064
Gary Marshall wrote:All:

I am working through the script Developing a Spring Framework MVC Application step-by-step.

I am sure this issues has been brought up many times and I have found many postings using Google but I have yet to find the solution to the problem I am having.

I am at Chapter 4 "Developing the Web Interface", and have completed all of the coding to add a PriceIncrease form as is stated in Step 4.5 "Adding a form, found here

When I export the WAR file containing all of these changes and deploy to Tomcat and then test by going to ....http://localhost:8080/springapp/priceincrease.htm, I get the following error:

java.lang.IllegalStateException: Cannot convert value of type [springapp.service.PriceIncreaseValidator] to required type [org.springframework.validation.Validator] for property 'validator': no matching editors or conversion strategy found
.... etc and so on...

I am simply trying to find out what I am doing wrong here and I cannot find a solution anywhere. I'm thinking the problem could be that this script is using the Spring 2.5 API and I am trying to work through this script using the Spring 3.0.5 API. Also, since the script requires a tld file I grabbed one from a Spring 2.0 API.

Is this the case? Am I having this "validator" issue because I am mixing versions of the API? If not, can someone please let me know how to fix this problem? Could there be another, more recent script that I can use, that employes the more current Spring MVC API that I could use to learn from?

Thanks to all for your time and assistance
Gary




Hi Gary,

I had several issues with this tutorial. For me, the tests proved problematic. There is at least one place where there's an outright typo in the code. I gave up on the tests and just got the thing to work, barely.

Sorry I didn't have an answer with this posting.

(Needless to say, this "tutorial" didn't do much to help me feel confident, or learn much about, Spring.)



mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The Validator is not Validating!!