Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.springframework.web.context.ContextLoader - Context initialization failed

 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Tomcat 6.0.16 with Spring 3.0.
When Tomcat starts, the following exception occurs




applicationContext.xml:




Many thanks for help,
 
Swaroop Kunduru
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should place the spring framework jars in your application classpath. Could you list the jars(Libraries) you are using in your application?

Regards,

Swaroop Kunduru.
 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find enclosed pom.xml, thanks




 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved this exception.
Reason was that there was an old jar still laying around in the Target directory: Spring.2.03.jar. No idea where this came from. I never used this version of Spring.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frank VanOor wrote:Solved this exception.
Reason was that there was an old jar still laying around in the Target directory: Spring.2.03.jar. No idea where this came from. I never used this version of Spring.


Usually stuff like that happens from a third party jar file that has a dependency in their pom that points to that jar. Then you have to have an <exclude> in your pom for the <dependency> of the third party jar.

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