A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
EJB and other Java EE Technologies
ClassPathXmlApplicationContext won't resolve
Joined: Jan 25, 2010
Jul 25, 2011 16:56:11
ApplicationContext ctx = new ClassPathXmlApplicationContext(
"com/springinaction/springidol/spring-idol.xml") won't resolve in Eclipse.
I used the shotgun approach so my eclipse build path contains the 20 jar files which downloaded with spring-framework-3.1.0.M2.
How do I determine what to import so ClassPathXmlApplicationContext resolves?
The javadocs at
indicates the full name of class ClassPathXmlApplicationContext is org.springframework.context.support.ClassPathXmlApplicationContext. But import org.springframework.context.support.* doesn't help and import org.springframework.context.support.ClassPathXmlApplicationContext doesn't resolve.
I have resolved the problem.
I was attaching the build path jar files from the src directory and not the dist directory.
I agree. Here's the link:
subject: ClassPathXmlApplicationContext won't resolve
Injecting a Dependency through Spring
Why cannot ApplicationContext find an existing file?
What jar to resolve this import
Importing a zipped package in Eclipse
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014