错误信息:
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)