- 爱易网页
-
Java教程
- org.hibernate.exception.GenericJDBCException: could not insert:解决办法
日期:2014-05-18 浏览次数:20701 次
org.hibernate.exception.GenericJDBCException: could not insert:
错误信息:
15:34:09,937 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate:155 - Running hbm2ddl schema update
15:34:09,938 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate:167 - fetching database metadata
15:34:09,940 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate:179 - updating schema
15:34:09,944 INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata:119 - table not found: loginandregister_ssh
15:34:09,944 INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata:119 - table not found: loginandregister_ssh
15:34:09,945 DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate:203 - create table loginandregister_ssh (id integer not null auto_increment, password varchar(255), username varchar(255), primary key (id))
15:34:09,945 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate:212 - Unsuccessful: create table loginandregister_ssh (id integer not null auto_increment, password varchar(255), username varchar(255), primary key (id))
15:34:09,945 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate:213 - No database selected
15:34:09,946 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate:217 - schema update complete
Hibernate:
insert
into
loginandregister_ssh
(password, username)
values
(?, ?)
15:34:10,036 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 1046, SQLState: 3D000
15:34:10,037 ERROR org.hibernate.util.JDBCExceptionReporter:101 - No database selected
Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not insert: [com.dqgb.Entity.User]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2176)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。