• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Context Loader problem : IllegalStateException

 
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the following error
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well it says


What does your web.xml look like?
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now it says...

 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My web.xml :

 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would definitely take a look at some spring tutorials examples to get you started. Typically your web.xml would look something more like this:

https://github.com/SpringSource/spring-mvc-showcase/blob/master/src/main/webapp/WEB-INF/web.xml

If you wanted to use java config things would be a little different but I am not sure which route you are going. Notice a couple important differences from what is in the link and what you have.

1. You are missing the ContextLoaderListener
2. You are not defining a ContextConfig for spring to bootstrap
3. Your dispatcher servlet mapping is typically / (your jsp's are mapped via view resolvers from the controllers handler mappings, see the same link for examples)
 
Ashish Agre
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to the Spring Framework and don't know any thing about it.
I know servlets & jsps but Spring is completely new to me.
I found lots of working examples but each examples configuration is different from other and i am stuck in finding which is the right one?
Kindly guide me in right direction.
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I can help you with a specific problem but Spring is a big subject to teach in a forum post. Here is what I would do:

1. search this forum for 'Spring Book' or 'Learning Spring' to get a bunch of ideas of where to start as these questions have been answered many times.
2. Search google for 'spring tutorials' or 'spring examples'. Try to use examples that are Spring 3 or later if possible. Googling around for some basic hello world type stuff I found these:
http://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/
http://www.giantflyingsaucer.com/blog/?p=2395
3. Check out the spring reference documentation it is really well written and probably the best single source of information out there. If you supplement it with a book like 'Spring in Action 3rd Edition' you will be well on your way.
4. Post back to this forum if you run into specific problems or questions and I am sure somebody will help you

Good Luck,
 
reply
    Bookmark Topic Watch Topic
  • New Topic