[opencms-dev] Duplicate key issue... & similar DB issues [continue] corrupt database

Andrea Puddu docpuddu at tiscali.it
Mon Oct 19 11:00:06 CEST 2009


Another recurring problem I've been experiencing in the last months is

 - "Duplicate entry" ERROR (see below..)
 
 is not clear to me why a resource has a duplicate key in the 
ONLINE_STRUCTURE since I've only tried to publish but the process didn't 
finish.
 Besides.. why if I try to 'touch' with 'rewrite' option (in order to 
re-assign a new ID) I have no success
 
 Any idea about this behaviour?
 
 Thanks a lot!
 Andrea
 

---------------------------
Andrea Puddu
docpuddu at tiscali dot it
http://www.linkedin.com/in/andreapuddu
-------------------------------------------


Publishing resources ...
Updating JSP loader cache...
.. JSP loader cache updated
Publishing folders ...
( 1 / 1 ) Publishing folder /agencies/media/09/10/17/ ... Error 
publishing folder "/sites/mysite/agencies/media/09/10/17/".
Exception org.opencms.db.CmsDbSqlException: An SQL error occurred when 
executing the following query: com.mysql.jdbc.PreparedStatement at 1048a1: 
INSERT INTO CMS_ONLINE_STRUCTURE 
(STRUCTURE_ID,RESOURCE_ID,RESOURCE_PATH,STRUCTURE_STATE,DATE_RELEASED,DATE_EXPIRED,PARENT_ID,STRUCTURE_VERSION) 
VALUES 
('4fd092dc-bacb-11de-8efe-b5e0d5a91d26','4fd092dd-bacb-11de-8efe-b5e0d5a91d26','/sites/mysite/agencies/media/09/10/17',0,0,9223372036854775807,'fd224826-ae37-11de-b63a-b5e0d5a91d26',0).
at org.opencms.db.generic.CmsVfsDriver.createResource(CmsVfsDriver.java:675)
at 
org.opencms.db.generic.CmsProjectDriver.publishFolder(CmsProjectDriver.java:1164)
at 
org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1370)
at org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5221)
at org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:197)
Caused by: 
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: 
Duplicate entry '4fd092dc-bacb-11de-8efe-b5e0d5a91d26' for key 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at org.opencms.db.generic.CmsVfsDriver.createResource(CmsVfsDriver.java:598)
... 4 more



More information about the opencms-dev mailing list