Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring ApplicationContext cannot be resolved even with jar

Tags:

java

spring

I have added the all spring distribution 3.1.1 jars to the build path which includes org.springframework.context-sources-3.1.1.RELEASE.jar org.springframework.beans-sources-3.1.1.RELEASE.jar.

But still the eclipse build error says, "The import org.springframework.context.ApplicationContext cannot be resolved".

Before adding the all jars in spring distribution 3.1.1, I have added jars manually one by one which includes, spring-context-3.0.2.RELEASE.jar and spring-beans-3.0.2.RELEASE.jar. At that time the ApplicationContext recognized successfully. But then i thought adding jars one by one is waster of time and why not download all jars in latest spring distribution and give it to build path.

Initially i thought it might be a conflict with complied class in build forder because i build the project with diferent versions of context-sources jar. So i delete the build folder and clean the project too. Still the issue exists when i add spring 3.1.1 jars.

like image 326
FrankD Avatar asked Aug 30 '26 07:08

FrankD


1 Answers

Include these libraries:

  • org.springframework.context.support-3.1.0.RELEASE.jar and
  • org.springframework.context-3.1.0.RELEASE.jar
like image 71
deepakraut Avatar answered Aug 31 '26 21:08

deepakraut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!