Not sure if this is a Hibernate or Spring question!
I'm using hibernate and spring in my web application. The application is working fine and I am not writing unit test (I know I should do them first!!)
As part of the testing I need to dynamically setup data so i'm trying to use the following code to obtain a bean that already has a session and persistance manager:
ApplicationContext context = new FileSystemXmlApplicationContext(new String[]{"WEB-INF/worldpay-servlet.xml","test-src/persistance.xml"});
as descripbed on the following page:
http://www.coyotesong.com/hibernate/110.html
but i'm getting the following error:
org.springframework.context.ApplicationContextException: Invalid application context: needs to be of type 'org.springframework.web.context.WebApplicationContext'
The XML files are parsed, but there's no real indeication what's going wrong.
Has anyone got any ideas?
Thanks,
Paul