-->
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: "Duplicate entry 'turin' for key 2" with mysql 4.
PostPosted: Mon Feb 07, 2005 8:15 pm 
Regular
Regular

Joined: Sat Feb 21, 2004 8:54 pm
Posts: 60
Location: Lakewood, California
hi, does ce work with mysql 4.1.9 or is it still not a real db?

thanks

Hibernate version:
caveatemptor downloaded tday
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
net.sf.hibernate.JDBCException: could not insert: [org.hibernate.auction.model.User]

org.hibernate.auction.exceptions.InfrastructureException: net.sf.hibernate.JDBCException: could not insert: [org.hibernate.auction.model.User] at org.hibernate.auction.dao.UserDAO.makePersistent(Unknown Source) at org.hibernate.auction.test.TestCaseWithData.initData(Unknown Source) at org.hibernate.auction.test.ItemTest.testPlaceBid(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.hibernate.auction.test.TestCase.runTest(Unknown Source)Caused by: net.sf.hibernate.JDBCException: could not insert: [org.hibernate.auction.model.User] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:558) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432) at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388) ... 20 moreCaused by: java.sql.SQLException: Duplicate key or integrity constraint violation message from server: "Duplicate entry 'turin' for key 2" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278) at com.mysql.jdbc.Connection.execSQL(Connection.java:2251) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1772) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1619) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:528) ... 27 more
Name and version of the database you are using:
mysql 4.1.9 on winxp/sp2
The generated SQL (show_sql=true):
noting shows up with mysql=true
Debug level Hibernate log excerpt:
nothing show up with:
log4j.logger.org.hibernate.auction=debug
log4j.logger.net.sf.hibernate=debug

_________________
<http://tayek.com/>, co-chair <http://www.ocjug.org/>, actively
seeking telecommuting work. hate spam?
<https://www1.ietf.org/mailman/listinfo/asrg>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 08, 2005 1:43 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Name and version of the database you are using:
mysql 4.1.9 on winxp/sp2
The generated SQL (show_sql=true):
noting shows up with mysql=true
Debug level Hibernate log excerpt:
nothing show up with:
log4j.logger.org.hibernate.auction=debug
log4j.logger.net.sf.hibernate=debug

This is certainly wrong and a misconfiguration. It looks like your database is not cleaned properly before you run the tests a second time. Please invest a minute more finding out whats going on, its not an issue with the software but your setup. Can't do much from here.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 10:55 am 
Regular
Regular

Joined: Sat Feb 21, 2004 8:54 pm
Posts: 60
Location: Lakewood, California
christian wrote:
Name and version of the database you are using:
mysql 4.1.9 on winxp/sp2
The generated SQL (show_sql=true):
noting shows up with mysql=true
Debug level Hibernate log excerpt:
nothing show up with:
log4j.logger.org.hibernate.auction=debug
log4j.logger.net.sf.hibernate=debug

This is certainly wrong and a misconfiguration. It looks like your database is not cleaned properly before you run the tests a second time. Please invest a minute more finding out whats going on, its not an issue with the software but your setup. Can't do much from here.


i did do a drop and add before running junitreport. and this is repeatable.
but maybe this (drop and create) needs to be done inside the build file. i
will investigate. any clues on how to get the sql and logging up would be
appreciated. i've had that problem before, i just can't recall how to fix it).

thanks
p.s. sorry if this is a repost, it seems to work and then get lost whne i post from home.

_________________
<http://tayek.com/>, co-chair <http://www.ocjug.org/>, actively
seeking telecommuting work. hate spam?
<https://www1.ietf.org/mailman/listinfo/asrg>


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.