-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: When complie ,Hibernate wants to create a new table for me
PostPosted: Sun Aug 07, 2005 3:28 am 
Newbie

Joined: Fri Aug 05, 2005 3:35 am
Posts: 4
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: --> ResultSet.java:4464 com.mysql.jdbc.ResultSet.realClose(false)
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: <-- ResultSet.java:4464 com.mysql.jdbc.ResultSet.realClose(..) returning null
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: <-- ResultSet.java:7079 com.mysql.jdbc.ResultSet.finalize(..) returning null
[java] ERROR - Unsuccessful: create table EVENTS (EVENT_ID bigint not null, EVENT_DATE timestamp, TITLE varchar(255), primary key (EVENT_ID))
Here--> [java] ERROR - Table 'events' already exists
[java] INFO - schema export complete
[java] INFO - cleaning up connection pool: jdbc:mysql://localhost/king
[java] INFO - Checking 0 named queries
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: --> Statement.java:1627 com.mysql.jdbc.Statement.finalize()
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: <-- Statement.java:1627 com.mysql.jdbc.Statement.finalize(..) returning null
[java] Hibernate: select event0_.EVENT_ID as EVENT1_, event0_.EVENT_DATE as EVENT2_0_, event0_.TITLE as TITLE0_ from EVENTS event0_
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: --> Statement.java:1627 com.mysql.jdbc.Statement.finalize()
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: <-- Statement.java:1627 com.mysql.jdbc.Statement.finalize(..) returning null
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: --> ResultSet.java:7079 com.mysql.jdbc.ResultSet.finalize()
[java] Sun Aug 07 13:58:50 CST 2005 TRACE: <-- ResultSet.java:7079 com.mysql.jdbc.ResultSet.finalize(..) returning null
[java] Event: My Event Time: 2005-08-07 13:57:46.0
[java] INFO - closing
[java] INFO - cleaning up connection pool: jdbc:mysql://localhost/king

When complie ,Hibernate wants to create a new table for me
But where is the mistake?
or where can I config to avoid creating a new table when comple?
Thanks a lot!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 07, 2005 3:29 am 
Newbie

Joined: Fri Aug 05, 2005 3:35 am
Posts: 4
the code are all copied from the chapter2 in hibernate-doc


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 07, 2005 4:41 am 
Newbie

Joined: Fri Aug 05, 2005 3:35 am
Posts: 4
oh,I find the config text in Hibernate.cfg.xml,just as follow

<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.