This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

ClassNotFoundException: ConfigurableApplicationContext

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   Trying to deploy project with spring, i was faced with following issue:


      As i understand, the "root of evil" in this line: java.lang.ClassNotFoundException: org.springframework.context.ConfigurableApplicationContext

      Excerpt from the pow.xml,  with dependencies:


     
 
Ranch Hand
Posts: 1769
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrey,
you may want to take a look at this https://stackoverflow.com/questions/9923852/basic-spring-mvc-web-app-causes-contextloaderlistener-error and https://stackoverflow.com/questions/22491245/tomcat-7-failed-to-start-from-within-eclipse/22491327


Maybe, try to put ${org.springframework.version}  for the version of spring-context. I am sure ${org.springframework.version} is a variable defined in IntelliJ.
Or, try to clean and rebuild the project.
 
Andrey Dmitriev
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:

Maybe, try to put ${org.springframework.version}  for the version of spring-context. I am sure ${org.springframework.version} is a variable defined in IntelliJ.
Or, try to clean and rebuild the project.



 Hi!
 But Idea does not allow me to use ${org.springframework.version}.  underlined it in red and does not import changes...
 
Andrey Dmitriev
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   And I cleaned/installed project,  even tomcat reinstalled.
   But without success
 
Himai Minh
Ranch Hand
Posts: 1769
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrey,
You may want to find .m2/repository directory in your computer first.
Then , navigate to .m2/repository/org/springframework/spring-context folder. Back up the content of it first.
Then, remove the contents in the folder.
I have a feeling that your spring-context-5.0.x.Release.jar is not the latest or corrupted.

Or, for the version of spring-context, put the latest version in the pom.xml. The latest version is 5.2.0.RELEASE
 
Andrey Dmitriev
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   Himai Minh,

   Following Your advice, i removed spring-context folder.
   Then deleted spring-context-dependency from pom.xml,  imported changes, cleaned/installed project.
   Then added spring-context-dependency to pom.xml  again.
   As a result, the content of spring-context folder . updated.

   But the problem continued - ClassNotFoundException: org.springframework.context.ConfigurableApplicationContext.....
 
Rancher
Posts: 4322
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just so we know, what is your ${spring.version}?
 
Andrey Dmitriev
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  Version is 5.2.0.RELEASE

  The problem is solved after redeploying the project and updating all dependencies/sources.
  However, the reason has not been established.
 
Himai Minh
Ranch Hand
Posts: 1769
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrey,
The only reason I can think of is the spring-context.jar is corrupted.
 
Andrey Dmitriev
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:Hi, Andrey,
The only reason I can think of is the spring-context.jar is corrupted.



  Hi!
  Perhaps so
 
I just had the craziest dream. This tiny ad was in it.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!