• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

No bean named 'anyBean' is defined [Just want Spring an iBatis together]

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello folks,

I'm so frustrated. I'm working on this problem since yesterday and I'm just dancing around the problem. It have to be a very simple issue. Hope so!

OK, i've this file/folder structure:

myProject.src.java.myProject.domain.User.java
myProject.src.java.myProject.domain.maps.User.xml
myProject.src.java.myProject.service.Administrable.java
myProject.src.java.myProject.service.UserManager.java
myProject.web.WEB-INF.applicationContext.xmlmyProject.web.WEB-INF.sqlmap-config.xml
myProject.test.myProject.service.UserManagerTest.java

applicationContext.xml



sqlmap-config.xml



And in my UserManagerTest.java I do this



And it keeps and keeps saying: "No bean named 'userManager' is defined."
I checked get ac.getAliases() and it contains nothing. What is wrong?

I need help!

Thank you all for hints to solve this.
 
soeren
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I just got it fixed.
I solved the problem by moving the spring xml files to classpath-root.
I think I used "classpath:**/" wrong. I'm very new to this java things.

I'm better in coding little C.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For those of you who may have found this via a web search - this problem may occur if somewhere on your classpath there exists an older version of the applicationContext.xml file
(either resident on the server or in some other location on your classpath) which may not be updated when you update the application during the edit and deploy process.

To solve the problem, perform a search on your system, locate any applicationContext.xml file - open it, if the file is associated with your application, verify that it references beans which you've added in your most recent iteration of development.

If not, and you prefer not to delete these files, update their contents by copying and pasting the most updated applicationContext file into the ones which are found. I hope this makes sense.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic