[Geoserver-devel] Upgrading GeoServer from 1.5.x to 1.6.0

Is there some documentation on how to upgrade an existing GeoServer
installation from 1.5.x to 1.6.0? I know there is
  http://docs.codehaus.org/display/GEOSDOC/Upgrade+Tutorial+War+file
(and obviously I have my own GEOSERVER_DATA_DIR) but that does not tell
you about the incompatible changes to catalog.xml and services.xml.
I had to figure that out for myself; it would be very convenient if it
was documented somewhere.

Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

On Fri, November 9, 2007 4:15 pm, Gertjan van Oosten wrote:

Is there some documentation on how to upgrade an existing GeoServer
installation from 1.5.x to 1.6.0? I know there is
http://docs.codehaus.org/display/GEOSDOC/Upgrade+Tutorial+War+file
(and obviously I have my own GEOSERVER_DATA_DIR) but that does not tell
you about the incompatible changes to catalog.xml and services.xml. I had
to figure that out for myself; it would be very convenient if it was
documented somewhere.

There is no documentation anywhere and... I would have to hunt down
for the changes myself too.
Yet, GeoServer is meant to be forward compatible so GeoServer 1.6.x should
be able to load a GeoServer 1.5.x data directory without issues (if you
find one, it's a bug).
Anyways, out of the top of my head:
* the logging subsystem configuration changed
* the user/access privilege managemnet is in the security/user.properties
and security/services.properties (and there is no UI for that)

That's what I do remember... anything to add? :slight_smile:
Cheers
Andrea

What were the incompatible changes to catalog.xml and services.xml? Our goal is that you should just be able to point it at the new data dir, if that didn't work right away that's a big bug and should definitely be reported.

best regards,

Chris

Gertjan van Oosten wrote:

Is there some documentation on how to upgrade an existing GeoServer
installation from 1.5.x to 1.6.0? I know there is
  http://docs.codehaus.org/display/GEOSDOC/Upgrade+Tutorial+War+file
(and obviously I have my own GEOSERVER_DATA_DIR) but that does not tell
you about the incompatible changes to catalog.xml and services.xml.
I had to figure that out for myself; it would be very convenient if it
was documented somewhere.

Regards,

As quoted from aaime@anonymised.com:

Yet, GeoServer is meant to be forward compatible so GeoServer 1.6.x should
be able to load a GeoServer 1.5.x data directory without issues (if you
find one, it's a bug).
Anyways, out of the top of my head:
* the logging subsystem configuration changed

Indeed. Requires you to modify services.xml.

* the user/access privilege managemnet is in the security/user.properties
and security/services.properties (and there is no UI for that)

Indeed, even though the <adminUserName> is still in services.xml it is
not being used. It should be taken out, and furthermore the user must
change security/users.properties to set the right admin username and
password.

That's what I do remember... anything to add? :slight_smile:

Yes I have:

- the connection parameters for (at least) a shapefile datastore have
  changed:
  * the connection parameter that used to have name = "shapefile url"
    has now name = "url"
  * it appears to require a connection parameter like
    <parameter value = "ISO-8859-1" name = "charset" />

These require the user to change catalog.xml.
I think those were all I needed to change to get 1.6.0-beta4 running.
If someone could verify this independently that would of course help.

Then a minor annoyance: the order of the attributes on e.g. <namespace> or
<style> n catalog.xml seems to change randomly between GeoServer releases.
E.g. GeoServer 1.5.1 had <style id = "x" filename = "x.sld" />,
1.5.4a has <style filename = "x.sld" id = "x" /> and
1.6.0-beta4 has <style id = "gshhs_c_land" filename = "gshhs_c_land.sld" />
(IIRC).
That's not a functional change, but it made it more difficult to see
what had actually been changed when I was hunting down why 1.6.0 didn't
pick up my data dir correctly.

Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

Gertjan van Oosten ha scritto:

As quoted from aaime@anonymised.com:

Yet, GeoServer is meant to be forward compatible so GeoServer 1.6.x should
be able to load a GeoServer 1.5.x data directory without issues (if you
find one, it's a bug).
Anyways, out of the top of my head:
* the logging subsystem configuration changed

Indeed. Requires you to modify services.xml.

Requires is an overstatement. I've just started GeoServer 1.6.0 beta4
against the same data directory we shipped along with GeoServer 1.5.3
and it started up just fine, I did not have to change anything relating
to logs. GeoServer would store the log configuration in the new format
as soon as you save it. The only thing is that the old logging level
is lost and GeoServer would fall back on the default one.
Added an issue to document this better for the 1.6.0 release:
http://jira.codehaus.org/browse/GEOS-1502

* the user/access privilege managemnet is in the security/user.properties
and security/services.properties (and there is no UI for that)

Indeed, even though the <adminUserName> is still in services.xml it is
not being used. It should be taken out, and furthermore the user must
change security/users.properties to set the right admin username and
password.

Right, I did not notice this. Thanks for reporting.
Scheduled a couple of issues on this one:
http://jira.codehaus.org/browse/GEOS-1500
http://jira.codehaus.org/browse/GEOS-1499

That's what I do remember... anything to add? :slight_smile:

Yes I have:

- the connection parameters for (at least) a shapefile datastore have
  changed:
  * the connection parameter that used to have name = "shapefile url"
    has now name = "url"

Hmmm.... I looked into 1.5.3 and 1.4.1 data dirs and they do use "url" both. Yet at some time we have had "shapefile url" all right, I still
have some random data dir with those ones.
Did some svn forensics, the old indexed shapefile datastore used in
fact "shapefile url" but when Jody merged it back to the shapefile
datastore (rev 26202, gt2) he renamed it back to "url" for consistency
with the "normal" shapefile datastore.

I guess the only workaround is to place an ugly "if "shapefile url"
then "url"" in the config reading code...
http://jira.codehaus.org/browse/GEOS-1501

  * it appears to require a connection parameter like
    <parameter value = "ISO-8859-1" name = "charset" />

That attribute is not there in the 1.5.3 data dir that I succesfully
opened. So it's not required as far as I can see.

Then a minor annoyance: the order of the attributes on e.g. <namespace> or
<style> n catalog.xml seems to change randomly between GeoServer releases.
E.g. GeoServer 1.5.1 had <style id = "x" filename = "x.sld" />,
1.5.4a has <style filename = "x.sld" id = "x" /> and 1.6.0-beta4 has <style id = "gshhs_c_land" filename = "gshhs_c_land.sld" />
(IIRC).
That's not a functional change, but it made it more difficult to see
what had actually been changed when I was hunting down why 1.6.0 didn't
pick up my data dir correctly.

Attributes are being stored into a hasmap before being written, and hashmaps are not order preserving... so whatever code
change we may put in, it's not going to give you back the order you had.
Anyways, the config subsystem is going to be replaced, so we're not
going to put any effort in the current one any more (when we move
to a new config subsystem the file format will change completely
and we'll upgrade GeoServer version number to 2).

Cheers
Andrea

Hi Andrea,

As quoted from Andrea Aime <aaime@anonymised.com>:

Requires is an overstatement. I've just started GeoServer 1.6.0 beta4
against the same data directory we shipped along with GeoServer 1.5.3
and it started up just fine, I did not have to change anything relating
to logs. GeoServer would store the log configuration in the new format
as soon as you save it. The only thing is that the old logging level
is lost and GeoServer would fall back on the default one.

Which is the DEVELOPER settings I think, and just rendering a single PNG
from my coastline shapefiles generated more than 10 MBytes of logging
(and took very, very long because of that). So for my set-up to be
practical, I was more or less forced to change the logging to something
less verbose.

Added an issue to document this better for the 1.6.0 release:
http://jira.codehaus.org/browse/GEOS-1502

OK.

Scheduled a couple of issues on this one:
http://jira.codehaus.org/browse/GEOS-1500
http://jira.codehaus.org/browse/GEOS-1499

OK.

> - the connection parameters for (at least) a shapefile datastore have
> changed:
> * the connection parameter that used to have name = "shapefile url"
> has now name = "url"

Hmmm.... I looked into 1.5.3 and 1.4.1 data dirs and they do use "url"
both. Yet at some time we have had "shapefile url" all right, I still
have some random data dir with those ones.

My data dir too, obviously. So my data stores using these shapefile
defs were no longer available.

I guess the only workaround is to place an ugly "if "shapefile url"
then "url"" in the config reading code...
http://jira.codehaus.org/browse/GEOS-1501

Or tell people to change their config. :wink:

> * it appears to require a connection parameter like
> <parameter value = "ISO-8859-1" name = "charset" />

That attribute is not there in the 1.5.3 data dir that I succesfully
opened. So it's not required as far as I can see.

OK, I wasn't sure, like I said. When my old shapefiles weren't served
anymore I modified these and after that they were available again. I
didn't go back and see which of these changes wasn't really required.

Anyways, the config subsystem is going to be replaced, so we're not
going to put any effort in the current one any more

I can live with that.

Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

Gertjan van Oosten ha scritto:

Hi Andrea,

As quoted from Andrea Aime <aaime@anonymised.com>:

Requires is an overstatement. I've just started GeoServer 1.6.0 beta4
against the same data directory we shipped along with GeoServer 1.5.3
and it started up just fine, I did not have to change anything relating
to logs. GeoServer would store the log configuration in the new format
as soon as you save it. The only thing is that the old logging level
is lost and GeoServer would fall back on the default one.

Which is the DEVELOPER settings I think, and just rendering a single PNG
from my coastline shapefiles generated more than 10 MBytes of logging
(and took very, very long because of that). So for my set-up to be
practical, I was more or less forced to change the logging to something
less verbose.

Hmmm... that happened to me once too, and I reported it, but then
no one, me included, was able to reproduce it.
I'm working against an unmodified 1.5.1 data directory now and
my logging level is equivalent to the old INFO, that is, I don't
get all the extra infos... Unfortunately I don't know how to
replicate the behaviour you're seeing.... can you provide us
with a data directory and a set of steps to reproduce the issue?

Cheers
Andrea

Ciao Andrea,

As quoted from Andrea Aime <aaime@anonymised.com>:

Unfortunately I don't know how to
replicate the behaviour you're seeing.... can you provide us
with a data directory and a set of steps to reproduce the issue?

The data directory in question is ~260 MBytes...

Cordiali saluti,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600