我正在做一个使用 Hibernate 访问数据库的 ZK 应用程序。我正在尝试按照此示例进行 JUnit 测试,但在 JUnit 视图中出现此错误:
org.zkoss.zats.mimic.impl.emulator.EmulatorException:
at org.zkoss.zats.mimic.impl.emulator.JettyEmulator.<init>(JettyEmulator.java:143)
at org.zkoss.zats.mimic.impl.emulator.EmulatorBuilder.create(EmulatorBuilder.java:130)
at org.zkoss.zats.mimic.DefaultZatsEnvironment.init(DefaultZatsEnvironment.java:86)
at org.zkoss.zats.mimic.Zats.init(Zats.java:46)
at br.ufjf.tcc.controller.LoginControllerTest.init(LoginControllerTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
而控制台上的这个错误:
Caused by:
java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
顺便问一下,有没有更好的工具来测试 ZK 应用程序?