testSaveStudent()报空异常

来源:1-11 通过Hibernate API编写访问数据库的代码

冬青ing

2015-11-30 13:06

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)


写回答 关注

1回答

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

    没有初始化对象吧

    junior... 回复冬青ing

    那就是hibernate初始化没有成功呗

    2015-12-03 13:30:51

    共 2 条回复 >

Hibernate初探之单表映射

Java持久化框架Hibernate入门教程,掌握Hibernate基本概念

74808 学习 · 793 问题

查看课程

相似问题