wood burning stoves 2.0*
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
Author

Spring JUnit error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Guys,

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, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.

Mark


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

Joined: Sep 26, 2006
Posts: 9243
    
    1

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: http://aspose.com/file-tools
 
subject: Spring JUnit error
 
Similar Threads
hibernate/Code Coverage(Emma plugin)
Exception when trying to run a test with Spring runner
FileNotFoundException for context file
Spring TestCase Exception
JUnit and Spring