• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BeanCreationException

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So... Do have two controllers mapped to the same resource?
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.sorry for not using code tags before.

The following is the CheckdbController.java


Validate.java

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message says "validate1"; I don't see that bean definition.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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")"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic