File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Spring JUnit error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring JUnit error" Watch "Spring JUnit error" New topic

Spring JUnit error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031


I have a JUnit test class which I run using Spring. Following is what I have configured to my JUnit type

When I try to run my test method, I get the following error:

What the heck is app-config.xml? I'm not referencing it anywhere. Suggestions on what might be wrong?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Do you have any <import> tags in any of those configuration files? And maybe those <import> config files, have <import> tags. But somewhere you are looking up that config file.

Or do you have any Java COnfiguration classes with @Configuration that are @ImportResource other config files?

Good Luck.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031

Oh yes, I figured out what the problem was. My JUnit test class extends from another super class and in that super class, there was a reference to the aop-config.xml. I do not know who has added it. Guess it could be due to eclipse auto fill feature or something else. I removed it and it all started working again.
I agree. Here's the link:
subject: Spring JUnit error
It's not a secret anymore!