• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you provide the full bean config xml file? maybe the position of the bean is not suitable.
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Ranch Hand
Posts: 88
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bang Nguyen
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so how did you configure web.xml for this?
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic