• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

does not support command class

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post your mappings. It seems that Spring is being told to do a dependency injection that doesn't exist, or it expects one and you didn't declare it.

Mark
 
Darshan Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .



4) OHBillDdao.java




5) OHBillManager.java



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

Once again thanks for Reply
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your doing great with the English.

I found this in a Google Search with the text "Spring Validator Command"

http://tech-scribbles.blogspot.com/2006/06/spring-validator-does-not-support.html

there might be some more good stuff with that search, if that first link doesn't help.

Good Luck

Mark
 
Darshan Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,
first of all sorry for late reply.from last last i m not touch with this topic tht y unable to reply you. what ever you send me link i go through but i did get any thin from that.

i hope you undersatnd my problem.
please tell me solution for that and one more thin can you guide me exact proper way for spring web application development.

thanks.
 
Darshan Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
even i am go through the link whatever mentioned their , i check according to my war file also ...is it right..
but still i m confusing wht should i do???
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the action-servlet.xml you posted, you have autowire="byName" set.

Is there a bean or property named "commandClass" defined that might be mapped onto the OhbillFormController's commandClass property?

Also, in the documentation of springmodules Commons Validator it says,

"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"?

 
Darshan Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Darshan Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

OHBill.java


 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic