问答详情
源自:1-11 通过Hibernate API编写访问数据库的代码

testSaveStudent()报空异常

java.lang.NullPointerException

at org.eclipse.jdt.internal.junit4.runner.SubForestFilter.shouldRun(SubForestFilter.java:81)

at org.junit.internal.runners.TestClassMethodsRunner.filter(TestClassMethodsRunner.java:84)

at org.junit.runner.manipulation.Filter.apply(Filter.java:47)

at org.junit.internal.runners.TestClassRunner.filter(TestClassRunner.java:64)

at org.junit.runner.manipulation.Filter.apply(Filter.java:47)

at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:34)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77)

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

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)


提问者:冬青ing 2015-11-30 13:06

个回答

  • juniortalant
    2015-12-01 16:27:15
    已采纳

    没有初始化对象吧