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

测试异常 org.hibernate.annotations.common.Version <clinit>,求指教

七月 15, 2016 4:40:59 下午 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
七月 15, 2016 4:40:59 下午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.4.Final}
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
七月 15, 2016 4:40:59 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: students.hbm.xml
七月 15, 2016 4:40:59 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 15, 2016 4:40:59 下午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
七月 15, 2016 4:40:59 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
七月 15, 2016 4:40:59 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
七月 15, 2016 4:40:59 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
七月 15, 2016 4:40:59 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql:///students?useUnicode=true&characterEncoding=UTF-8]
七月 15, 2016 4:40:59 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
七月 15, 2016 4:40:59 下午 org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
WARN: HHH000342: Could not obtain connection to query metadata : Access denied for user 'root'@'localhost' (using password: NO)
七月 15, 2016 4:40:59 下午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
七月 15, 2016 4:40:59 下午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000422: Disabling contextual LOB creation as connection was null
七月 15, 2016 4:40:59 下午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
七月 15, 2016 4:40:59 下午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
七月 15, 2016 4:41:00 下午 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
七月 15, 2016 4:41:00 下午 org.hibernate.tool.hbm2ddl.SchemaExport execute
ERROR: HHH000231: Schema export unsuccessful
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:204)
    at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
    at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:52)
    at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:367)
    at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304)
    at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:500)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1790)
    at StudentsTest.init(StudentsTest.java:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    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)

七月 15, 2016 4:41:00 下午 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
七月 15, 2016 4:41:00 下午 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1045, SQLState: 28000
七月 15, 2016 4:41:00 下午 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Access denied for user 'root'@'localhost' (using password: NO)

正在回答

5 回答

六月 22, 2019 2:05:36 下午 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

六月 22, 2019 2:05:36 下午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

六月 22, 2019 2:05:36 下午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

六月 22, 2019 2:05:36 下午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

六月 22, 2019 2:05:36 下午 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

六月 22, 2019 2:05:36 下午 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

六月 22, 2019 2:05:36 下午 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: Students.hbm.xml


0 回复 有任何疑惑可以回复我~

七月 01, 2017 3:41:03 下午 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.0.Final}

七月 01, 2017 3:41:03 下午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.0.0.CR6}

七月 01, 2017 3:41:03 下午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

七月 01, 2017 3:41:03 下午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

七月 01, 2017 3:41:04 下午 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /Hibernate.cfg.xml

七月 01, 2017 3:41:04 下午 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /Hibernate.cfg.xml


0 回复 有任何疑惑可以回复我~

四月 12, 2017 8:07:40 下午 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

四月 12, 2017 8:07:40 下午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

我的是这样报错  怎么办啊 

0 回复 有任何疑惑可以回复我~
#1

寻水的鱼丶

你的错误解决了吗?我也是这样的错误啊,不会改,求指教
2017-05-14 回复 有任何疑惑可以回复我~
#2

寻水的鱼丶 回复 clevertang

我已经解决了,是代码敲漏了,照着老师的代码重新敲一边就可以了
2017-05-16 回复 有任何疑惑可以回复我~

同出现错误求解

1 回复 有任何疑惑可以回复我~
#1

慕设计0211321

我的能测试了我把Myeclipse的编码改为UTF-8就可以测试了
2016-07-19 回复 有任何疑惑可以回复我~
#2

慕沐7780984 回复 慕设计0211321

赞 完美解决
2018-06-17 回复 有任何疑惑可以回复我~

已经解决了,一个是xml文件的位置不对,一个数据库的名称没有正确

0 回复 有任何疑惑可以回复我~
#1

qq_刘宜博_0

怎么解决的啊 ?
2016-07-18 回复 有任何疑惑可以回复我~
#2

美香

同求,请问这个问题怎么解决?
2017-11-21 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Hibernate初探之单表映射
  • 参与学习       74800    人
  • 解答问题       835    个

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

进入课程

测试异常 org.hibernate.annotations.common.Version <clinit>,求指教

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号