[error] Importing solution

Hi to All,

could Someone resolve this problem, while importing a solution?

[error] com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “servoy_elements_pkey”

Tanks in advance.
Gianni Pinna.

Hi Gianni,

It means that the primary key already exists in the table. You might want to update the servoy sequences on the repository_server connection.
After you have done this try to import the solution again.

Hope this helps.

Hi Robert,
You are always very kind’ and we remeber You with gratitude. tank You very much again.
What is the the way to update the repository server?
Tanks in advance.
Gianni Pinna.

Hi Gianni,

You can update it in Servoy-admin > Database Servers. Here you select the ‘repository_server’ connection.
Then at the bottom of the screen you find the ‘Update servoy sequences for all tables’ button.
After you have done this you can reimport the solution.

Hope this helps.

Hi Robert,
tank You for Your replay. It permitted me to correctly execute Your suggestion.
But,after execution i read the same error message:

[error] com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “servoy_elements_pkey”

I’ m sure You will find the solution.
tanks in advance.
Gianni Pinna.

Hi Gianni,

It’s hard to see what the problem is here and would require more information to know how this happend.
But a quick-and-dirty solution to your problem is to simply delete all solutions from the repository and re-import them again.
NOTE: This does require you to have all the *.servoy files before you do this.

Just go the servoy-admin pages > solutions. Here you click the red X below the list. This X will delete ALL solutions listed.
After you have deleted them you need to restart the servoy server before you can re-import the solutions again.
This should solve your import problem.

Hope this helps.

Hi, Robert,
tank You very much.
With Your suggestions,the problem wos perfecly resolved.
Have You what You wish, dear Robert!
Sincerly.
Gianni Pinna.