This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hi all, i am darshan. i am very new abt spring and hibernate. i am stucking some errors form last week. below error i got . i tried to debugg several times but still i unable to find out exact solution for this problem.
default constructor call in OhbillFormController... [HllLegal1] ERROR [http-8080-Processor5] DispatcherServlet.initServletBean(228) | Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean wit h name 'OhbillFormController' defined in ServletContext resource [/WEB-INF/actio n-servlet.xml]: Initialization of bean failed; nested exception is java.lang.Ill egalArgumentException: Validator [org.springmodules.commons.validator.DefaultBea nValidator@1890c67] does not support command class [com.cybermanagers.legal.mode l.OHBill] java.lang.IllegalArgumentException: Validator [org.springmodules.commons.validat or.DefaultBeanValidator@1890c67] does not support command class [com.cybermanage rs.legal.model.OHBill]
if any one know please guide me .. i really appericiate for your reply.
Thanks Mark for giving reply me... here i sending whtver code are suppose to be added in several fils
1) following are bean add in action-servlet.xml
2)OHBillFormController.java added in action
3)Following is pojo file OHBill.java wrote in model .
i wrote this all classes in my existing project. i want to store new data in new table tht y i wrote new pojo file which i give to you. this class are set to as setcommand class in controller then i got exception when i run application on tomcat.
Does not support command class...
i am very new abt spring and hibernate... if you have to something figure out form this then Guide me...i am very stucking ....ignore my english grammer mistake
"The beanValidator bean uses the value of the property commandClass of the controller to select the name of the form tag in the validation.xml file. The configuration is not based on the commandName property. For example, with the class name org.springmodules.sample.MyForm, Commons Validator must contain a form tag with myForm as value of the name property."
It appears that capitalization matters here, so this might be where the problem is...
Do you have a form validation entry in your validation.xml with the name "oHBill"?
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Oct 20, 2007
Hi Nathan, according to you instruction i update changes till i m stucking with same problem. actually whatever way i following is it right or wrong i am confusing about that.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OhbillFormController' defined in ServletContext resource [/WEB-INF/action-servlet.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Validator [org.springmodules.commons.validator.DefaultBeanValidator@abaf8c] does not support command class [com.cybermanagers.legal.model.OHBill] java.lang.IllegalArgumentException: Validator [org.springmodules.commons.validator.DefaultBeanValidator@abaf8c] does not support command class [com.cybermanagers.legal.model.OHBill]
Thanks for your reply.
Joined: Oct 20, 2007
Hi all, right now i able to display jsp page...but right now i got one error
org.springframework.beans.NotReadablePropertyException: Invalid property 'description' of bean class [com.cybermanagers.legal.model.OHBill]: Bean property 'description' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
Your getDescription()/setDescription() methods are both marked as protected... you'll need to make at least the getter public. The class created by the JSP isn't going to be in the same package/class structure as your OHBill class(most likely, unless you've defined a package structure and class for the JSP to be compiled to), so it can't call the protected methods.