junit.framework.AssertionFailedError: Error initializing action servlet: Unable to find /WEB-INF/web.xml.  TestCase is running from D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo directory.  Context directory is D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo.  /WEB-INF/web.xml must be found under the context directory, the directory the test case is running from, or in the classpath.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via strutstestcase by nobody
, 1 year ago
Error initializing action servlet: Unable to find /WEB-INF/web.xmlTestCase is running from D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo directoryContext directory is D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo.  /WEB-INF/web.xml must be found under the context directory, the directory the test case is running from, or in the classpath.
via Google Groups by divya, 2 years ago
element for locator('xpath=//a[starts-with (text(),'cfName')]') IS present unexpectedly
via GitHub by Donnerbart
, 1 year ago
Key cannot be an odd number :18
via commons-dev by Continuum@vmbuild.apache.org, 1 year ago
WARNING: Expected half the threads to fail expected:<10> but was:<8>
via commons-dev by Continuum@vmbuild.apache.org, 1 year ago
WARNING: Expected half the threads to fail expected:<10> but was:<7>
junit.framework.AssertionFailedError: Error initializing action servlet: Unable to find /WEB-INF/web.xml.  TestCase is running from D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo directory.  Context directory is D:\eclipse3.0.2\eclipse\workspace\ValidatorDemo.  /WEB-INF/web.xml must be found under the context directory, the directory the test case is running from, or in the classpath.
at junit.framework.Assert.fail(Assert.java:47)
at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:342)
at com.yourcompany.struts.test.LogonActionTest.setUp(LogonActionTest.java:42)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)

Users with the same issue

Once, 4 weeks ago
Once, 1 month ago
28 times, 1 month ago
Once, 3 months ago
4 times, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.