已有101人关注
JAVA项目开发实战入门 在第二章05节遇到问题
发表在Java图书答疑 2018-01-19 《Java项目开发实战入门》第2章 通讯录系统
是否精华
版块置顶:

一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Environment <clinit>
信息: Hibernate 3.2.0
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Environment <clinit>
信息: hibernate.properties not found
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Environment buildBytecodeProvider
信息: Bytecode provider name : cglib
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Environment <clinit>
信息: using JDK 1.4 java.sql.Timestamp handling
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Configuration configure
信息: configuring from resource: /hibernate.cfg.xml
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
信息: Configuration resource: /hibernate.cfg.xml
一月 19, 2018 5:49:22 下午 org.hibernate.cfg.Configuration addResource
信息: Reading mappings from resource: pojo/User.hbm.xml
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
信息: Mapping class: pojo.User -> tb_users
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.Configuration addResource
信息: Reading mappings from resource: pojo/Customer.hbm.xml
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
信息: Mapping class: pojo.Customer -> tb_customer_info
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.Configuration addResource
信息: Reading mappings from resource: pojo/Communication.hbm.xml
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
信息: Mapping class: pojo.Communication -> tb_communication_info
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.Configuration doConfigure
信息: Configured SessionFactory: null
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.HbmBinder bindCollectionSecondPass
信息: Mapping collection: pojo.Customer.communicationList -> tb_communication_info
一月 19, 2018 5:49:23 下午 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: Using Hibernate built-in connection pool (not for production use!)
一月 19, 2018 5:49:23 下午 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: Hibernate connection pool size: 20
一月 19, 2018 5:49:23 下午 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: autocommit mode: false
一月 19, 2018 5:49:23 下午 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://192.168.1.104:3306/test02
一月 19, 2018 5:49:23 下午 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: connection properties: {user=root, password=****}
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
警告: Could not obtain connection metadata
java.sql.SQLException: null,  message from server: "Host 'ShaoNan' is not allowed to connect to this MySQL server"
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1038)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2249)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2280)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
 at java.sql.DriverManager.getConnection(DriverManager.java:664)
 at java.sql.DriverManager.getConnection(DriverManager.java:208)
 at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
 at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
 at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
 at com.mr.contact.hibernate.HibernateInitialize.<clinit>(HibernateInitialize.java:20)
 at com.mr.contact.dao.DAOimpl.selectUsableCustomer(DAOimpl.java:236)
 at frame.MainFrame.getUsableModleSoure(MainFrame.java:42)
 at frame.MainFrame.initTable(MainFrame.java:32)
 at frame.MainFrame.init(MainFrame.java:25)
 at com.mr.contact.swing.ContactFrame.<init>(ContactFrame.java:50)
 at frame.MainFrame.<init>(MainFrame.java:15)
 at frame.MainFrame.main(MainFrame.java:77)

一月 19, 2018 5:49:23 下午 org.hibernate.dialect.Dialect <init>
信息: Using dialect: org.hibernate.dialect.MySQLDialect
一月 19, 2018 5:49:23 下午 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
信息: Using default transaction strategy (direct JDBC transactions)
一月 19, 2018 5:49:23 下午 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
信息: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Automatic flush during beforeCompletion(): disabled
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Automatic session close at end of transaction: disabled
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Scrollable result sets: disabled
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: JDBC3 getGeneratedKeys(): disabled
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Connection release mode: auto
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Maximum outer join fetch depth: 2
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Default batch fetch size: 1
一月 19, 2018 5:49:23 下午 org.hibernate.cfg.SettingsFactory buildSettings
信息: Generate SQL with comments: disabled

 at org.hibernate.loader.Loader.doQuery(Loader.java:661)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
 at org.hibernate.loader.Loader.doList(Loader.java:2144)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
 at org.hibernate.loader.Loader.list(Loader.java:2023)
 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
 at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
 at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
 at com.mr.contact.dao.DAOimpl.selectUsableCustomer(DAOimpl.java:240)
 at frame.MainFrame.getUsableModleSoure(MainFrame.java:42)
 at frame.MainFrame.initTable(MainFrame.java:32)
 at frame.MainFrame.init(MainFrame.java:25)
 at com.mr.contact.swing.ContactFrame.<init>(ContactFrame.java:50)
 at frame.MainFrame.<init>(MainFrame.java:15)
 at frame.MainFrame.main(MainFrame.java:77)
Caused by: java.sql.SQLException: null,  message from server: "Host 'ShaoNan' is not allowed to connect to this MySQL server"
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1038)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2249)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2280)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
 at java.sql.DriverManager.getConnection(DriverManager.java:664)
 at java.sql.DriverManager.getConnection(DriverManager.java:208)
 at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
 ... 20 more


分享到:
精彩评论 2
ShaoMan
学分:3 LV1
2018-01-19
沙发

有人知道哪里出错了么?


根号申
学分:4736 LV12
TA的每日心情
2021-07-16 23:48:46
2018-01-20
板凳

数据库禁止远程登录,如果你是连接本地数据库,请将数据库IP改成127.0.0.1,如果是连接远程数据库,请按照网友分析的文章设置数据库:

https://www.cnblogs.com/jesu/p/5650699.html

首页上一页 1 下一页尾页 2 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照