Hi there Matt! First of all thanks for Appfuse, we've been using it with great success :) Recently I've changed from spring 1.2 to spring 2.0 and when I run the ant test-web task it gives me the following error:
[junit] Testcase: testContextInitialized(webapp.listener.StartupListenerTest): Caused an ERROR [junit] Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! [junit] java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! [junit] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:170) [junit] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) [junit] at webapp.listener.StartupListener.contextInitialized(StartupListener.java:46) [junit] at webapp.listener.StartupListenerTest.testContextInitialized(StartupListenerTest.java:51) Now I've searched the web for people with the same problem and I reached the following url: http://www.nabble.com/Deploy-appfuse-1.9.3-on-weblogic-9.1-t2202566s2369.html I've tried your fix, but without success. I've tried removing the following lines from StartupListenerTest and it worked: ServletContextListener contextListener = new ContextLoaderListener(); ServletContextEvent event = new ServletContextEvent(sc); contextListener.contextInitialized(event); But it doesn't make much sense that with spring 2.0 I have to remove this to work Now my application works fine with spring 2.0, simply the unit tests are breaking because of this and this is annoying as you can imagine. Can you help me out here? Thanks a lot!!!! -- View this message in context: http://www.nabble.com/Problems-on-StartupListenerTest-with-spring-2.0-tf4167301s2369.html#a11856240 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]