• 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
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

ClassNotFoundException: ConfigurableApplicationContext

 
Ranch Hand
Posts: 92
  • 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: 1772
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: 92
  • 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: 92
  • 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: 1772
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: 92
  • 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.....
 
Master Rancher
Posts: 4370
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: 92
  • 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: 1772
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: 92
  • 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
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
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!