wood burning stoves 2.0*
The moose likes Spring and the fly likes Wont let me import ApplicationContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Wont let me import ApplicationContext" Watch "Wont let me import ApplicationContext" New topic

Wont let me import ApplicationContext

David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
HI guys
I just installed spring 2.5,and spring ide.for some reason ,when i want to import ApplicationContext and ClassPathXmlApplicationContext in the main class ,it says i should create classes for them (ApplicationContext and ClassPathXmlApplicationContext).I am using eclipse ,jdk 1.6.
Thank you in advance
David Newton

Joined: Sep 29, 2008
Posts: 12617

Is it a Spring project?
David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
yes it is a spring project.Seems like it cant recognize the packages (org.springframework.context.ApplicationContext;
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Did you add the Spring Nature to your projects? Or is it set to be a Spring project?

Sounds totally like a classpath issue. Your classpath isn't pointing to the Spring jar files.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
i use Eclipse and then added spring IDE through Eclipes update manager.It is all set,under spring project but i wonder why it cant find the spring jar?
I agree. Here's the link: http://aspose.com/file-tools
subject: Wont let me import ApplicationContext
Similar Threads
ClassPathXmlApplicationContext won't resolve
Spring Junit test issue
When to use ApplicationContext start()
Scheduling job.
Can I read Spring configuration twice in my applction?