I am trying to test my struts actions but can't even get through the setUp method.
All I have in setUp() is:
super.setUp();
setConfigFile("C:/Projects/Enhanced IDE/web/WEB-INF/struts-config.xml");
setServletConfigFile("C:/Projects/Enhanced IDE/web/WEB-INF/web.xml");
The error I get is:
junit.framework.AssertionFailedError: Received an exception while loading web.xml - class java.lang.NullPointerException : null
at servletunit.struts.MockStrutsTestCase.setServletConfigFile(MockStrutsTestCase.java:502)
at test.saic.ide.acronym.TestAcronymAction.setUp(TestAcronymAction.java:10)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
My web.xml runs fine in my Tomcat container, could it be the relative paths in the web.xml not resolving to proper places (seeing as how ant moves it when it's built). I don't know. I'm stuck and I'm tired. :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to test my struts actions but can't even get through the setUp method.
All I have in setUp() is:
super.setUp();
setConfigFile("C:/Projects/Enhanced IDE/web/WEB-INF/struts-config.xml");
setServletConfigFile("C:/Projects/Enhanced IDE/web/WEB-INF/web.xml");
The error I get is:
junit.framework.AssertionFailedError: Received an exception while loading web.xml - class java.lang.NullPointerException : null
at servletunit.struts.MockStrutsTestCase.setServletConfigFile(MockStrutsTestCase.java:502)
at test.saic.ide.acronym.TestAcronymAction.setUp(TestAcronymAction.java:10)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
My web.xml runs fine in my Tomcat container, could it be the relative paths in the web.xml not resolving to proper places (seeing as how ant moves it when it's built). I don't know. I'm stuck and I'm tired. :(