• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to resolve this exception in Spring

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '..........Service' defined in ServletContext resource [/WEB-INF/mss-service.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean
 
Marshal
Posts: 77231
370
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would need to provide lots more details before we could help.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That means that something went wrong when Spring was initializing beans. But the part of the error message that you posted does not contain enough information to tell what exactly went wrong.

When something goes wrong when Spring initializes its beans, then you often get very long stack traces with multiple "caused by" messages. Often you can find the ultimate cause of the problem by looking at the last of these messages, at the bottom of the long stack trace. So, start looking there to find out what's wrong.
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sumit Gautam wrote: nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '..........Service' defined in ServletContext resource [/WEB-INF/mss-service.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean



Hi, Sumit,

Spring's application context is an object factory. When it tries to produce a new object, it fails.

Please check your configuration file, something is mis-configured there in terms of defining one of the Spring beans wired in there by XML markup (or by an annotation if you're using those).

With best regards,

Anton.
reply
    Bookmark Topic Watch Topic
  • New Topic