Link to home
Start Free TrialLog in
Avatar of chaitu chaitu
chaitu chaituFlag for India

asked on

what is the meaning of this exception ::Validator [com.XXX.validators.PartyValidator@427262] does not support command class

ERROR [org.springframework.web.servlet.DispatcherServlet] Could not complete request
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'maintainPartyForm' defined in null: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Validator [com.XXX.validators.PartyValidator@427262] does not support command class [com.XXX.forms.BusinessFormBackingObject]
java.lang.IllegalArgumentException: Validator [com.XXX.validators.PartyValidator@427262] does not support command class [com.XXX.forms.BusinessPartyFormBackingObject]
      at org.springframework.web.servlet.mvc.BaseCommandController.initApplicationContext(BaseCommandController.java:240)
      at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:79)
      at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:84)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:240)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:347)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chaitu chaitu

ASKER

in which configuation file this wiring will be written?
i am newbie to spring?why its not returning true?in which aspects should i look?
in PartyValidator.java
in which configuation file this wiring will be written?
public class PartyValidator extends GenericObjectValidator {

public boolean supports(Class clazz) {
            return BusinessFormBackingObject.class.equals(clazz);
      }
}
looks like that should like:

            return BusinessFormBackingObject.class.equals(clazz) || BusinessPartyFormBackingObject.class.equals(clazz);