Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

ClassNotFoundException: ConfigurableApplicationContext

 
Ranch Hand
Posts: 122
  • 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 Foreman
Posts: 1896
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: 122
  • 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: 122
  • 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 Foreman
Posts: 1896
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: 122
  • 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: 4576
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: 122
  • 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 Foreman
Posts: 1896
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: 122
  • 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 claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic