• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

The Validator is not Validating!!

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Bartender
Posts: 1752
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too late to reply to this.. but better late than Never. The answer to this problem can be found on the following link...

https://stackoverflow.com/questions/45403268/spring-batch-rowmapper-no-matching-editors-or-conversion-strategy-found

The problem was that the PriceIncreaseValidator class did not implement the Validator interface and thus the conversion of type error was encountered.
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic