锁定老帖子 主题:配置错误请教
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2003-12-17
我测试没有问题
如下 17:29:33,450 INFO Environment:432 - Hibernate 2.1 final 17:29:33,630 INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.gjt.mm.mysql.Driver, hibernate.jdbc.fetch_size=50, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=25, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=wangjq, hibernate.connection.url=jdbc:mysql://192.168.8.198/test?useUnicode=true&characterEncoding=gb2312, hibernate.show_sql=true, hibernate.connection.password=, hibernate.connection.pool_size=1} 17:29:33,680 INFO Environment:480 - using java.io streams to persist binary types 17:29:33,750 INFO Environment:481 - using CGLIB reflection optimizer 17:29:34,001 INFO Configuration:305 - Mapping resource: User.hbm.xml 17:29:38,206 INFO Binder:220 - Mapping class: User -> USER 17:29:38,787 INFO Configuration:305 - Mapping resource: Post.hbm.xml 17:29:38,937 INFO Binder:220 - Mapping class: Post -> POST 17:29:38,977 INFO Configuration:571 - processing one-to-many association mappings 17:29:38,977 INFO Binder:1104 - Mapping collection: User.posts -> POST 17:29:38,987 INFO Configuration:580 - processing one-to-one association property references 17:29:38,987 INFO Configuration:605 - processing foreign key constraints 17:29:39,137 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect 17:29:39,147 INFO SettingsFactory:55 - JDBC result set fetch size: 50 17:29:39,147 INFO SettingsFactory:58 - Maximim outer join fetch depth: 1 17:29:39,147 INFO SettingsFactory:62 - Use outer join fetching: true 17:29:39,187 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!); 17:29:39,187 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1 17:29:39,247 INFO DriverManagerConnectionProvider:71 - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://192.168.8.198/test?useUnicode=true&characterEncoding=gb2312 17:29:39,257 INFO DriverManagerConnectionProvider:72 - connection properties: {user=wangjq, password=} 17:29:39,327 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended); 17:29:40,629 INFO SettingsFactory:89 - Use scrollable result sets: true 17:29:40,629 INFO SettingsFactory:90 - JDBC 2 max batch size: 25 17:29:40,639 INFO SettingsFactory:96 - echoing all SQL to stdout 17:29:40,639 INFO SettingsFactory:99 - Query language substitutions: {no='N', true=1, yes='Y', false=0} 17:29:40,639 INFO SettingsFactory:110 - cache provider: net.sf.hibernate.cache.HashtableCacheProvider 17:29:40,659 INFO Configuration:1044 - instantiating and configuring caches 17:29:42,511 INFO SessionFactoryImpl:118 - building session factory 17:29:43,012 INFO ReflectHelper:149 - reflection optimizer disabled for: Post, BulkBeanException: Property is private (property setOwner); 17:29:43,333 INFO ReflectHelper:149 - reflection optimizer disabled for: User, BulkBeanException: Property is private (property setPosts); 17:29:44,734 INFO SessionFactoryObjectFactory:82 - no JNDI name configured 17:29:44,764 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect 17:29:44,764 INFO Configuration:571 - processing one-to-many association mappings 17:29:44,764 INFO Configuration:580 - processing one-to-one association property references 17:29:44,774 INFO Configuration:605 - processing foreign key constraints 17:29:44,774 INFO Configuration:571 - processing one-to-many association mappings 17:29:44,774 INFO Configuration:580 - processing one-to-one association property references 17:29:44,784 INFO Configuration:605 - processing foreign key constraints 17:29:44,794 INFO SchemaExport:96 - Running hbm2ddl schema export 17:29:44,804 INFO SchemaExport:115 - exporting generated schema to database 17:29:44,814 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!); 17:29:44,814 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1 17:29:44,814 INFO DriverManagerConnectionProvider:71 - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://192.168.8.198/test?useUnicode=true&characterEncoding=gb2312 17:29:44,814 INFO DriverManagerConnectionProvider:72 - connection properties: {user=wangjq, password=} drop table if exists USER 17:29:45,155 DEBUG SchemaExport:130 - drop table if exists USER drop table if exists POST 17:29:45,495 DEBUG SchemaExport:130 - drop table if exists POST create table USER ( USER_ID VARCHAR(255); not null, E_MAIL VARCHAR(255);, PASSWORD VARCHAR(255);, NICK_NAME VARCHAR(255);, primary key (USER_ID); ); 17:29:45,645 DEBUG SchemaExport:147 - create table USER ( USER_ID VARCHAR(255); not null, E_MAIL VARCHAR(255);, PASSWORD VARCHAR(255);, NICK_NAME VARCHAR(255);, primary key (USER_ID); ); create table POST ( POST_ID BIGINT NOT NULL AUTO_INCREMENT, TITLE VARCHAR(255);, CONTENT VARCHAR(255);, OWNER_ID VARCHAR(255);, primary key (POST_ID); ); 17:29:45,846 DEBUG SchemaExport:147 - create table POST ( POST_ID BIGINT NOT NULL AUTO_INCREMENT, TITLE VARCHAR(255);, CONTENT VARCHAR(255);, OWNER_ID VARCHAR(255);, primary key (POST_ID); ); alter table POST add index (OWNER_ID);, add constraint FK2590A091C80647 foreign key (OWNER_ID); references USER (USER_ID); 17:29:45,906 DEBUG SchemaExport:147 - alter table POST add index (OWNER_ID);, add constraint FK2590A091C80647 foreign key (OWNER_ID); references USER (USER_ID); 17:29:46,066 INFO SchemaExport:158 - schema export complete 17:29:46,086 INFO DriverManagerConnectionProvider:137 - cleaning up connection pool: jdbc:mysql://192.168.8.198/test?useUnicode=true&characterEncoding=gb2312 Hibernate: insert into POST (TITLE, CONTENT, OWNER_ID); values (?, ?, ?); Hibernate: SELECT LAST_INSERT_ID(); Hibernate: insert into USER (E_MAIL, PASSWORD, NICK_NAME, USER_ID); values (?, ?, ?, ?); Hibernate: update POST set OWNER_ID=? where POST_ID=? Hibernate: select post0_.POST_ID as POST_ID, post0_.TITLE as TITLE, post0_.CONTENT as CONTENT, post0_.OWNER_ID as OWNER_ID from POST post0_ where (post0_.TITLE='test' ); Hibernate: select user0_.USER_ID as USER_ID0_, user0_.E_MAIL as E_MAIL0_, user0_.PASSWORD as PASSWORD0_, user0_.NICK_NAME as NICK_NAME0_ from USER user0_ where user0_.USER_ID=? gigix@umlchina.com xiongjie@csdn.net Hibernate: update USER set E_MAIL=?, PASSWORD=?, NICK_NAME=? where USER_ID=? |
|
返回顶楼 | |
发表时间:2003-12-17
我试过了,可能是驱动问题,你的驱动是不是3.0.6的?
http://forum.hibernate.org.cn/viewtopic.php?p=9558#9558 |
|
返回顶楼 | |