Root object of element X has changed

Hi everybody,

We have 2 very similar solutions (almost same code but doing different things) and when trying to import both of them on the same server we get this error for the second solution we import (for any solution):

[error] com.servoy.j2db.persistence.RepositoryException: Root object of element X has changed (object has been moved), from Solution1 to Solution2; delete solution Solution1 first or clean import.

Even when running localhost server with Developer open.
In the past we didn’t have this problem. Some code has probably changed it?! Any idea?

This error message means that element (same uuid) already exists in the repository but in a different solution. What Servoy version do you use ?

We use Servoy version 4.1.4 -build 681 and Servoy version 4.1.3 -build 672 (same problem on both servers)
Even if we do a clean install of Servoy it will not let import the second solution.

Foobrother:
We use Servoy version 4.1.4 -build 681 and Servoy version 4.1.3 -build 672 (same problem on both servers)
Even if we do a clean install of Servoy it will not let import the second solution.

If you have an element with same uuid in both solutions that’s normal, because it will find it at import and then fails. So, is the element X present in both solutions ?

lvostinar:
If you have an element with same uuid in both solutions that’s normal, because it will find it at import and then fails. So, is the element X present in both solutions ?

Probably, as both solutions use the same base code, I have to look at it.
But why not being able to have 2 very similar solutions on the same Server? They should be imported as totally new solutions and have new ids when imported into the repository? :roll:

Edit: I had a look at the element causing problems. Here is the code declaring the element in the first solution installed:

/**
 * @properties={typeid:35,uuid:"e6c36055-daaa-4ca4-a5cc-16f302427a04",variableType:-4}
 */
var g_sections_filter = null;

I’ll try to delete and recreate the element to get a new uuid.

Deleting and re-creating the element seemed to work but now I have another error because the style used has the same name:

[error] com.servoy.j2db.persistence.RepositoryException: A different style with the name ‘Elite’ already exists, but the import is protected. Rename or remove the style in the repository.

So now I have to delete the style of the solution, create a new one with another name and change the style everywhere the old style name was used :x
Not really handy :|

PS: is it fixed on Servoy 5? Because we plan to migrate soon :roll:

Foobrother:
Deleting and re-creating the element seemed to work but now I have another error because the style used has the same name:

[error] com.servoy.j2db.persistence.RepositoryException: A different style with the name ‘Elite’ already exists, but the import is protected. Rename or remove the style in the repository.

So now I have to delete the style of the solution, create a new one with another name and change the style everywhere the old style name was used :x
Not really handy :|

PS: is it fixed on Servoy 5? Because we plan to migrate soon :roll:

It still behaves the same in 5.0 . It won’t let you overwrite a style or solution if the sample is protected .

lvostinar:
It still behaves the same in 5.0 . It won’t let you overwrite a style or solution if the sample is protected .

:?

Not really flexible. Imagine someone buys 2 protected solutions from 2 different companies. If these solutions have the same style name or even element uuid (which would be extremely unlikely but possible), you can’t install the second one. :(

I think I’ll change manually the style, it will be the easiest solution.

Just saw that I made a mistake when I have re-created the element to get another uuid. After I have tried to import on another test their, that’s why I got this other error message.
When I try on the correct server I still get the same error saying that the element X has moved etc…

So even by recreating the element to generate a new uuid is not working :(

What can I do?

Foobrother:
Just saw that I made a mistake when I have re-created the element to get another uuid. After I have tried to import on another test their, that’s why I got this other error message.
When I try on the correct server I still get the same error saying that the element X has moved etc…

So even by recreating the element to generate a new uuid is not working :(

What can I do?

Open a case (also sample would be nice) and we’ll have a closer look.

Case 258387 created.

Unfortunately I cannot provide sample, because I would need to send our full solutions which is not allowed.
But I can advise you to maybe add solution 2 as a module of solution 1, then duplicate forms from the module to get it into solution 1 and then remove solution 2. That’s what we did to integrate bit from a solution to another.
Obviously for the style issue you can create exactly the same style on both solution (with same name).

Cheers.

Sone replied to my case and gave me the following solution:

The easy way to solve this is to make one solution in developer a module of the other, then it will probably report massive ammounts of duplicate UUID’s, which can be “quick fixed” in the problem view

How can I add the second solution as a module of the first one if I’m not able to import the second solution?

Hmm, did you try clean import ?

lvostinar:
Hmm, did you try clean import ?

No, I have found another way which seems to work.
I have done the import via Developer (solution>import) it just asked me if I wanted to Overwrite or Skip the style. Then I had my second solution into Developer!
I have just removed the duplicate uuid.
By the way, they were 4 and all in globals.js. I have 100+ methods/variables in globals.js. So If I had copied this file to create a second solution I should have had 100+ dupllicate uuid?! :?

Now I’ll try an export and import it on our test server.

The import worked perfectly! No error/warning :mrgreen:

Thx for the help!