[color=red] 一:he hierarchy of the type Test Cactus LoginAction is inconsistent[/color]
These errors happend because some interface /class in the hierarchy cannot be resolve.
For example: the error is occur in your class - class x, x inherits y, and in turn, y inherits z. However, the compiler
cannot resolve z (in above error is EventManager), because z is belong to a library that is not included.
Therefore, you have to add package containing z to the classpath/ or project's Java Build Path (if you are using eclipse).
[color=red]二:import junit.framework.TestCase,错误的解释是The import junit cannot be resolved[/color]
在你的项目上点击右键--->Properties--->Java Build Path--->(Libraries标签)add Library-->JUnit-->Next-->Finish
[color=red]三:Transormer.class 未找到[/color]
要加入commons-collections-3.1.jar这个包,不然也会报错.
[color=red]四:使用StrutsTestCase:junit.framework.AssertionFailedError: The /WEB-INF/web.xml was not found. 或者 Missing configuration resource for path...[/color]
These errors happend because some interface /class in the hierarchy cannot be resolve.
For example: the error is occur in your class - class x, x inherits y, and in turn, y inherits z. However, the compiler
cannot resolve z (in above error is EventManager), because z is belong to a library that is not included.
Therefore, you have to add package containing z to the classpath/ or project's Java Build Path (if you are using eclipse).
[color=red]二:import junit.framework.TestCase,错误的解释是The import junit cannot be resolved[/color]
在你的项目上点击右键--->Properties--->Java Build Path--->(Libraries标签)add Library-->JUnit-->Next-->Finish
[color=red]三:Transormer.class 未找到[/color]
要加入commons-collections-3.1.jar这个包,不然也会报错.
[color=red]四:使用StrutsTestCase:junit.framework.AssertionFailedError: The /WEB-INF/web.xml was not found. 或者 Missing configuration resource for path...[/color]
public void setUp() throws Exception {
super.setUp();
File web = new File("D:/WEB_STORE/project/teststruts1/WebRoot");
this.setContextDirectory(web);
setConfigFile("/WEB-INF/web.xml");
setConfigFile("/WEB-INF/struts-config.xml");
//setConfigFile("/WEB-INF/struts-config-teststruts1.xml");
}