jQuery in Action, 3rd edition
The moose likes Testing and the fly likes Spring + Junit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Spring + Junit" Watch "Spring + Junit" New topic

Spring + Junit

sam backet

Joined: Sep 02, 2011
Posts: 22


I want to use the Spring to test classes. But I get the following error. The path is correct.

java.lang.IllegalStateException: Failed to load ApplicationContext

- IDE: Netbeans 7.0.1


Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32818

Is anything else in the stack trace? Usually when Spring can't create a context, it has trouble wiring or injecting something. Also, does Config.java really not have a package name. Putting things in the default package can be unpredictable.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
It is sorta covered in the JavaRanch Style Guide.
subject: Spring + Junit
jQuery in Action, 3rd edition