问答详情
源自:4-8 DAO层单元测试编码和问题排查(上)

输出sql语句

怎么打出sql语句,我看视频有输出啊,自己运行没有呢?

提问者:青山烟雨青衫客 2016-06-18 19:46

个回答

  • I醉里挑灯看剑
    2016-09-26 22:13:20

    java.lang.ExceptionInInitializerError

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

    at java.lang.reflect.Constructor.newInstance(Unknown Source)

    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)

    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

    Caused by: java.lang.IllegalStateException: SpringJUnit4ClassRunner requires JUnit 4.12 or higher.

    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<clinit>(SpringJUnit4ClassRunner.java:102)

    ... 17 more


  • 青山烟雨青衫客
    2016-06-18 19:58:34

    找到原因了,有个jar包没加进来,哈哈