ControllerTestCase 搜索目录异常
@绝望的八皮 你好,想跟你请教个问题:
maven 中运行 用 ControllerTestCase
会去搜索配置文件 不过 搜索目录好像不对啊 有个tar 目录不自动是哪里的
这个怎么解决
com.jfinal.ext.kit.ReflectException: java.lang.reflect.InvocationTargetException
at com.jfinal.ext.kit.Reflect.on(Reflect.java:650)
at com.jfinal.ext.kit.Reflect.call(Reflect.java:383)
at com.jfinal.ext.test.ControllerTestCase.initConfig(ControllerTestCase.java:56)
at com.jfinal.ext.test.ControllerTestCase.start(ControllerTestCase.java:66)
at com.jfinal.ext.test.ControllerTestCase.init(ControllerTestCase.java:103)
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:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
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.reflect.InvocationTargetException
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:601)
at com.jfinal.ext.kit.Reflect.on(Reflect.java:647)
... 28 more
Caused by: java.lang.IllegalArgumentException: Properties file not found: /E:/workspace/jump-Jetty/tarWEB-INFclasses/db.properties
at com.jfinal.config.JFinalConfig.loadPropertyFile(JFinalConfig.java:96)
at com.jayqqaa12.MyConfig.configConstant(MyConfig.java:54)
at com.jfinal.core.Config.configJFinal(Config.java:46)
at com.jfinal.core.JFinal.init(JFinal.java:67)
... 33 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
target目测是这个截出来的。。看样子mvn命令跑测试可能有问题。之前没注意这种情况