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

按老师的步骤全程模仿,但是依然出现问题

十一月 12, 2017 9:03:35 上午 org.hibernate.annotations.common.Version <clinit>

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

十一月 12, 2017 9:03:35 上午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

十一月 12, 2017 9:03:35 上午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

十一月 12, 2017 9:03:35 上午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

十一月 12, 2017 9:03:35 上午 org.hibernate.cfg.Configuration configure

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

十一月 12, 2017 9:03:35 上午 org.hibernate.cfg.Configuration getConfigurationInputStream

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

十一月 12, 2017 9:03:35 上午 org.hibernate.cfg.Configuration addResource

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

十一月 12, 2017 9:03:35 上午 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!

十一月 12, 2017 9:03:36 上午 org.hibernate.cfg.Configuration doConfigure

INFO: HHH000041: Configured SessionFactory: null

十一月 12, 2017 9:03:36 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)

十一月 12, 2017 9:03:36 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000115: Hibernate connection pool size: 20

十一月 12, 2017 9:03:36 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000006: Autocommit mode: false

十一月 12, 2017 9:03:36 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hibernate]

十一月 12, 2017 9:03:36 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000046: Connection properties: {user=root, password=****}

Sun Nov 12 09:03:36 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

十一月 12, 2017 9:03:36 上午 org.hibernate.dialect.Dialect <init>

INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect

十一月 12, 2017 9:03:36 上午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService

INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)

十一月 12, 2017 9:03:36 上午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>

INFO: HHH000397: Using ASTQueryTranslatorFactory


提问者:qq_DevilMayCry_33131065 2017-11-12 09:27

个回答

  • 慕丝8779423
    2019-08-30 11:27:56

    不同版本,獲取session方法不一樣https://img1.mukewang.com/5d6897b800019cef13810915.jpg

  • qq_南瓜_10
    2017-11-15 19:35:27

    你是不是session.save();没写