• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'id' is defined

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1)Please let me what has gone wrong in beans.xml?. I am getting error as "org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'id' is defined " when i run the program.


Main.java


Code.java


Asp.java



beans.xml



I am geeting error as


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Main.java:13 tries to get a bean named "id", and there isn't one. I suspect you meant "name", which is also not terribly clear.

Also, when posting code/stacktraces/etc. please make sure to wrap very long lines, otherwise we have to scroll to the right quite far in order read your post, edit our post, etc.
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Event after changing this line from




to this line.






I am still getting the error?



 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean, "still getting the error"? That's a completely different error.
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am Sorry.I appreciate you have helped me. But i mean that i am still getting new error. Can you please helpe me?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is your error

Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut display

So there appears to be something wrong in your AOP configuration. Either your pointcut is incorrect, or you are using a named pointcut and the Advice is trying to
point to the name, and it is an incorrect name.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic