import: Duplicate entry for key 1

I’m having trouble importing my solution. I’m afraid something has gotten messed up in the server repository. I get this error:

[error] com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry ‘8’ for key 1

If I try again it become entry ‘9’ for key 1, then ‘10’, etc.

The logs I’ve looked at do not seem to give me any more info. For what it’s worth, the solution seems to work fine after I activate it. But these errors worry me nonetheless.

This has worked fine in the past.

Hi java_macchiato

Have you a conflict between the MYSQL db handling PK’s versus the Servoy solution using a Servoy sequence ?

Cheers
Harry

Hello Harry,

All my primary key sequences in my solution are set to db identity.

I could be wrong, but my hunch is that this has less to do with my solution’s database and more to do with the servoy repository database on the server. I believe this because it only comes up when trying to import the solution to the server and because the key value increments each time I try to import. I’m guessing that there is some conflict in what the server thinks the release of the solution is and what my development machine thinks the release of the solution is.

I only have one solution in the server repository. If I wanted to wipe out all old releases (30 or so) and start from scratch, how would I do this? Or is that a bad idea. I’m comfortable editing SQL databases directly (SQL fluent).

Hi java_macchiato,

Just to rule things out. Are you also importing sample data with your solution ?

No sample data.

Thanks for the replies so quickly. It’s nice to have such an active community.

java_macchiato:
I only have one solution in the server repository. If I wanted to wipe out all old releases (30 or so) and start from scratch, how would I do this? Or is that a bad idea. I’m comfortable editing SQL databases directly (SQL fluent).

You can ‘flatten’ your solutions in your repository by deleting the whole solution (thus all releases) and re-importing your last release.
If you don’t have your latest release exported yet then do that first of course.

One thing you could do first though is update your sequences in the repository via the servoy admin pages (database servers page).
It’s a long shot though. But it can’t harm to try.

Hope this helps.