permaculture playing cards*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 30795

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

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jQuery in Action, 2nd edition
subject: Spring + Junit