This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes BeanCreationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "BeanCreationException" Watch "BeanCreationException" New topic
Author

BeanCreationException

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,

I am new to spring and i am trying to access the database connection from the ContactCrm-servlet.xml.I am getting the following error.Please correct me if i am wrong with xml file.

Error:

ContactCrm-servlet.xml:please assist me to solve this issue.

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. I have edited your post to correct this.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Can you post any annotations that the classes com.peopletech.Validate and com.peopletech.CheckdbController have? I sounds like they're both mapped to the same URL - /JSP/Checkdb.do


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

So... Do have two controllers mapped to the same resource?
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks for your reply.sorry for not using code tags before.

The following is the CheckdbController.java


Validate.java

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The error message says "validate1"; I don't see that bean definition.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I also missed the -


<context:component-scan base-package="com.peopletech" />


part and assumed your only controllers were the ones defined in the beans XML - with component-scan, it could be any class in com.peopletech with a @Controller, @Component, etc. annotation.

Can you search your project for "@RequestMapping("/JSP/Validate.do")"?
 
jQuery in Action, 2nd edition
 
subject: BeanCreationException
 
Similar Threads
Dialect class not found: org.hibernate.dialect.MySQLDialect
Getting Error in setting property values
Unable to configure Spring with Hibernate
Unable to connect to database
get ref bean from applicationContext.xml