Servoy Developer has all the right connections to my SQL Sever backend. Made a copy of the 2.2.5 repository. Developer correctly realizes that I have an older version of the repository and asks if I want to update. I say yes and get this error:
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: CREATE UNIQUE INDEX terminated because a duplicate key was found for object name ‘dbo.servoy_users’ and index name ‘u_ui’. The duplicate key value is ().
If I close out and restart, now when it tries to update it complains about all the new fields that are already there for 3.0 and a new table. So, I created this SQL script to get me back to square one.
DROP TABLE [dbo].[servoy_root_elements]
GO
ALTER TABLE [dbo].[servoy_media]
DROP COLUMN [media_hash]
GO
ALTER TABLE [dbo].[servoy_revision_history]
DROP COLUMN [root_element_id]
GO
ALTER TABLE [dbo].[servoy_elements]
DROP COLUMN [root_element_id]
GO
ALTER TABLE [dbo].[servoy_elements]
DROP COLUMN [uuid]
GO
ALTER TABLE [dbo].[servoy_users]
DROP COLUMN [user_uid]
GO
ALTER TABLE [dbo].[servoy_content_spec]
DROP COLUMN [is_metadata]
GO
ALTER TABLE [dbo].[servoy_client_stats]
DROP COLUMN [user_uid]
GO
ALTER TABLE [dbo].[servoy_group_elements]
DROP COLUMN [root_element_id]
GO
ALTER TABLE [dbo].[servoy_releases]
DROP COLUMN [root_element_id]
GO
Now I’m stuck in a rut.
Any help would be appreciated. I’m just trying to see what it would be like to develop with 3.0.
If we are going to have these troubles upgrading our current systems to 3.0 or 3.1 then things do not look good.
Hi, from the error message I guess that you have some bad data (duplicate value in a field which is not expected to have duplicated values) in your servoy_users table. You need to find it and delete it.
DO A NEW INSTALL. Install 3.x in a new folder, open up Servoy and let it auto-create the new db and stuff.
Assuming you’re using Sybase as you DB - copy your existing databases into the “database” folder, and copy your existing servoy.properties file
Start Servoy 3.x
When prompted, upgrade the repository
Hope this helps.
DO A NEW INSTALL. Install 3.x in a new folder, open up Servoy and let it auto-create the new db and stuff.
Did that.
Assuming you’re using Sybase as you DB - copy your existing databases into the “database” folder, and copy your existing servoy.properties file
Start Servoy 3.x
Not using Sybase. Using SQL Server 2005. See original message.
When prompted, upgrade the repository
Did that. It didn’t work. It fails everytime. It does not just work as advertised.
Hope this helps.
Might help someone, but not me or my company.
swingman:
Hi, from the error message I guess that you have some bad data (duplicate value in a field which is not expected to have duplicated values) in your servoy_users table. You need to find it and delete it.
Yeah, that’s what I thought too, but it’s actually Servoy that creates this column referenced in the error that it is trying to create an index upon. This column is created by the conversion process. The column is filled with NULL’s so the indexing thinks it’s duplicate data. This might be a SQL Server problem, but one that Servoy should have seen in their testing if the actually did testing against SQL Server. If it’s a problem with the way that we have our SQL Server set up, I’d like to know about it.