I've had this problem multiple times. It's an issue with JPA's List
handling: JPA does not allow duplicates in a List object, which is
problematic if one files contains a single chunk multiple times.

However, my current plan (and the code on my machine) gets rid of JPA
entirely, so this won't be an issue anymore. I am switching to an in-
memory scheme, and store the DB using my own file format.

-- 
You received this bug notification because you are a member of Syncany
Team, which is subscribed to Syncany.
https://bugs.launchpad.net/bugs/832057

Title:
  duplicate key sql error syncing db

Status in Syncany:
  New

Bug description:
  Running syncany on ubuntu 10.04.3 32bits local setup

  i get this error ( removing the .$HOME/.syncany/db do not solve )

  11-08-23 16:43:53 | ubuntu-desktop | 
org.eclipse.persistence.session.file:/home/ubuntu/syncany/syncany/dist/lib/syncany.jar_Syncany_url=jdbc:derby:/home/ubuntu/.syncany/db/syncany;create=true
 | InitProfiles       | WARNING  : 
  Local Exception Stack: 
  Exception [EclipseLink-4002] (Eclipse Persistence Services - 
2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
  Internal Exception: java.sql.SQLIntegrityConstraintViolationException: The 
statement was aborted because it would have caused a duplicate key value in a 
unique or primary key constraint or unique index identified by 
'SQL110823164346140' defined on 'CLONEFILE_CLONECHUNK'.
  Error Code: 20000
  Call: INSERT INTO CLONEFILE_CLONECHUNK (chunks_checksum, root_id, 
file_version, file_id, profile_id, chunks_ORDER) VALUES (?, ?, ?, ?, ?, ?)
        bind => [6 parameters bound]
  Query: DataModifyQuery(name="chunks" sql="INSERT INTO CLONEFILE_CLONECHUNK 
(chunks_checksum, root_id, file_version, file_id, profile_id, chunks_ORDER) 
VALUES (?, ?, ?, ?, ?, ?)")
        at 
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
        at 
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:798)

  Thank you

To manage notifications about this bug go to:
https://bugs.launchpad.net/syncany/+bug/832057/+subscriptions

-- 
Mailing list: https://launchpad.net/~syncany-team
Post to     : syncany-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~syncany-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to