为了账号安全,请及时绑定邮箱和手机立即绑定

利用Junit进行hibernate的测试时报错如下,请问是什么原因?

利用Junit进行hibernate的测试时报错如下,请问是什么原因?

慕粉1935374231 2017-05-08 14:22:25
五月 08, 2017 2:11:31 下午 org.hibernate.annotations.common.Version <clinit>INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}五月 08, 2017 2:11:31 下午 org.hibernate.Version logVersionINFO: HHH000412: Hibernate Core {4.1.4.Final}五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Environment <clinit>INFO: HHH000206: hibernate.properties not found五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Environment buildBytecodeProviderINFO: HHH000021: Bytecode provider name : javassist五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration configureINFO: HHH000043: Configuring from resource: /hibernate.cfg.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration getConfigurationInputStreamINFO: HHH000040: Configuration resource: /hibernate.cfg.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Administrator.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Answer.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Application_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Checking.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Checking_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Completion.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Completion_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Course.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Course_selection.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Message.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Multiplechoice_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Multiplechoice.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Paper.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Question.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Question_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Singlechoice.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Singlechoice_map.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Teacher.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Student.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration addResourceINFO: HHH000221: Reading mappings from resource: com/xjtuse/exam/entity/Application.hbm.xml五月 08, 2017 2:11:31 下午 org.hibernate.cfg.Configuration doConfigureINFO: HHH000041: Configured SessionFactory: null五月 08, 2017 2:11:32 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configureINFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)五月 08, 2017 2:11:32 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configureINFO: HHH000115: Hibernate connection pool size: 20五月 08, 2017 2:11:32 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configureINFO: HHH000006: Autocommit mode: false五月 08, 2017 2:11:32 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configureINFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/exam]五月 08, 2017 2:11:32 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configureINFO: HHH000046: Connection properties: {user=root, password=****}五月 08, 2017 2:11:32 下午 org.hibernate.dialect.Dialect <init>INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect五月 08, 2017 2:11:32 下午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateServiceINFO: HHH000399: Using default transaction strategy (direct JDBC transactions)五月 08, 2017 2:11:32 下午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>INFO: HHH000397: Using ASTQueryTranslatorFactory五月 08, 2017 2:11:32 下午 org.hibernate.validator.util.Version <clinit>信息: Hibernate Validator bean-validator-3.0-JBoss-4.0.2五月 08, 2017 2:11:32 下午 org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA信息: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.五月 08, 2017 2:11:32 下午 org.hibernate.AssertionFailure <init>ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.ClassNotFoundException: Singlechoice_map
查看完整描述

1 回答

?
tom的猫

TA贡献65条经验 获得超35个赞

重点在最后两行

ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.ClassNotFoundException: Singlechoice_map

查看完整回答
反对 回复 2017-05-08
  • 1 回答
  • 0 关注
  • 1878 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信