wood burning stoves 2.0*
The moose likes Spring and the fly likes org.springframework.beans.factory.NoSuchBeanDefinitionException No bean named Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "org.springframework.beans.factory.NoSuchBeanDefinitionException No bean named" Watch "org.springframework.beans.factory.NoSuchBeanDefinitionException No bean named" New topic
Author

org.springframework.beans.factory.NoSuchBeanDefinitionException No bean named

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
When I try to load a web page I get the following error:

rg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bidOfferPriceDecorator' is defined



in my applicationContext I have


The class com.global.cast.fund.web.view.BidOfferPriceDecorator does exist has been loaded into the WEB-INF/lib in a jar.

What else should I look for , is there a sort of check point lsit to go down when dealing with this sort of exception
Bang Nguyen
Greenhorn

Joined: Feb 03, 2009
Posts: 15
can you provide the full bean config xml file? maybe the position of the bean is not suitable.


http://trongbang86.blogspot.com
http://twitter.com/trongbang86
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

I hope you are using ServletContextLoadListener (spring class) to initialize spring container.
If so, you should watch logs closely while application startup or whenever spring container is intialized.
There must be some exception in initialization.

Also, are you using XmlBeanFactory or ClasspathApplicationContext to intialize spring container (if you are not using ServletContextLoadListener) ?
ClasspathApplicationContext is best as it intialized all beans in one go.


SCJP 91%, SCWCD 97%
Bang Nguyen
Greenhorn

Joined: Feb 03, 2009
Posts: 15
so how did you configure web.xml for this?
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
It was a build error I was loading all my context from conf/spring-conf/*_application_context.xml

The *application_context.xml with this bean defintion was under conf, wrong location. The reason it could not find the bean.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.springframework.beans.factory.NoSuchBeanDefinitionException No bean named
 
Similar Threads
Exception in PhaseListener RESTORE_VIEW 1 afterPhase
Failure to load tld files
org.hibernate.MappingException : Unknown Entity?
Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException:
validation problem