Il 19/11/2014 14:17, Guido Wimmel ha scritto:
Hi,
Hi Guido,
I'm currently evaluating the Syncope upgrade procedure from 1.1.X to
1.2.X (see the description in the Wiki[1]).
I'm not sure what is the recommended way to deal with the internal storage
(src/main/resources/content.xml).
The Wiki page says at first that one should "configure the internal storage
as done for the former 1.1.X project", then "change content.xml leaving
only new Entitlements".
Should one have a specific version of content.xml that is only relevant for
the upgrade? (which then cannot be used to set up a new instance from an
empty database)
No, there isn't a custom upgrade-purpose content.xml.
You have to use "basic" content.xml, that is the one you have when you
create a new Apache Syncope project, as explained in the wiki.
Should everything be commented out but the new entitlements, or should one
only comment out the entitlements that already exist in the database
and leave other declarations in (such as policies)? If I comment out everything
but the new entitlements, I get an error message about a missing
notificationJob.cronExpression (NullPointerException) on initialisation
(in JobInstanceLoader).
No you have to touch only Entitlements section, maybe in the wiki it was
explained in a misleading way. All other sections must remain the same
(untouched).
It's correct that you have a NPE because, if you comment out other
sections such as policies, conf, etc, there aren't useful information.
I changed the wiki to be more explanatory.
If I leave other declarations (such as config settings) in, won't they
overwrite the existing configuration in my 1.1.X database?
There seems to be a mechanism in content upgrader that explicitly doesn't
migrate some config settings (such as notificationJob.cronExpression) -
must these then be manually set again to their previous values in the
1.1.X database?
This point you noticed is interesting... The answer is yes, new
content.xml conf have priority and if in the "old" conf 1.1.X table
contains the same key with a value it will be written the "new" value
get from the content.xml mentioned above, especially the old value is
escaped and if the conf (that the upgrader finds) is in the list of new
confs, value isn't written to database.
And so yes you have to manually set the value if you want old one.
Maybe this section has to be re-thinked and improved, I will open an
issue about this problem.
Cheers,
Guido
[1]
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+1.1.X+to+1.2.X
I'm here available for all other questions.
Best regards,
Andrea
--
Dott. Andrea Patricelli
Tel +393204524292
Junior Engineer @ Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +390859116307 / FAX +39 0859111173
http://www.tirasa.net