Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!