It's not a secret anymore!
The moose likes Spring and the fly likes spring validation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring validation problem" Watch "spring validation problem" New topic

spring validation problem

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 196
Hi All,

i am getting the below error when i submit my form. Its not possible to understand the reason of the problem through stack trace.

Aug 19, 2009 4:05:09 PM org.springmodules.validation.commons.AbstractBeanValidat
or validate
SEVERE: Exception while validating object com.tutorial.mvc.User@1342545
org.apache.commons.validator.ValidatorException: org.springmodules.commons.valid
ator.FieldChecks at org.apache.commons.validator.ValidatorAction.loadValidationClass(
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(
at org.apache.commons.validator.Field.validateForRule(
at org.apache.commons.validator.Field.validate(
at org.apache.commons.validator.Form.validate(
at org.apache.commons.validator.Validator.validate(
at org.springmodules.validation.commons.AbstractBeanValidator.validate(

i dont this its because of some missing jars otherwise i would have got exception during startup.
My jsp is as follows

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="form" uri="" %>
<%@ taglib prefix="spring" uri="" %>
<form:form commandName="user" action="/springmvc/login.htm" method="POST">
<spring:message code=""></spring:message>
<form:input path="firstName"/>

<form:errors path="firstName"/>

<spring:message code=""></spring:message>
<form:input path="lastName"/>

<form:errors path="lastName"/>

<input type="submit" value="Submit" />

validation xml is

<form name="user">
<field property="firstName" depends="required">
<arg0 key="required.firstName" />
<field property="lastName" depends="required">
<arg0 key="required.lastName" />

Please let me know if i am missing something here.

Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Try to debug what happens at org.apache.commons.validator.ValidatorAction.loadValidationClass(

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 196
I think i am not getting the java script code on my jsp. I am submitting a blank form and it should be checked on client side only.

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 196
Can any body please let me know the process of including js in my jsp files as there is no HTML tag present in Spring. Struts uses HTML tag for including js functions in jsp.
I agree. Here's the link:
subject: spring validation problem
It's not a secret anymore!