[Geoserver-devel] upgrade geofence hibernate

Hi Niels,

Geotools is already using JDBC 4.2, so using anything but 4.2 is going to be a bit problematic.

Well, looking at hibernate, when building Geofence integrated version, the Postgres JDBC driver pulled in by hibernate will have to be excluded to not cause conflicts with Geotools:
https://github.com/hibernate/hibernate-orm/blob/master/databases/pgsql/matrix.gradle#L7

https://github.com/geotools/geotools/pull/1605

A different option might be to have instructions to delete the one pulled in by geotools, but I think that will end up being too confusing.

Thanks,
Ami

On Sun, Jul 2, 2017 at 8:17 AM <geoserver-devel-request@lists.sourceforge.net> wrote:

Send Geoserver-devel mailing list submissions to
geoserver-devel@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
or, via email, send a message with subject or body ‘help’ to
geoserver-devel-request@anonymised.comge.net

You can reach the person managing the list at
geoserver-devel-owner@anonymised.comet

When replying, please edit your Subject line so it is more specific
than “Re: Contents of Geoserver-devel digest…”

Today’s Topics:

  1. Re: upgrade geofence hibernate (Niels Charlier)

Message: 1
Date: Sat, 1 Jul 2017 20:39:30 +0200
From: Niels Charlier <niels@anonymised.com>
To: Emanuele Tajariol <etj@anonymised.com>
Cc: geoserver-devel@lists.sourceforge.net
Subject: Re: [Geoserver-devel] upgrade geofence hibernate
Message-ID: <54cde002-53e0-bfc9-6175-cc49b80dcc5c@anonymised.com>
Content-Type: text/plain; charset=utf-8; format=flowed

Hello Emanuele,

Thanks for your comments. We feel the same way about option (3),
although I feel it would be the easiest in short run, our concern is
indeed that we will end up needing to support this library by ourselves.

What about this question:

We would like to upgrade to Hibernate 5.2 after all, which means moving
to JDBC 4.2. Would that be okay for your end?

Kind Regards

Niels

On 30-06-17 19:28, Emanuele Tajariol wrote:

Hi Niels,

  1. Switch to another framework, in which case spring data seems to be
    the obvious choice to me. There are two sub-options
    Since the DAO module shall work both inside the standalone GeoFence version
    and within GeoServer (when using the geofence-server plugin), I’d go with the
    full removal of the genericdao library, and use the same libs GeoServer is
    already using.
    If GeoServer is not using anything particular, we may just go and see if we
    can simply use the hibernate API to do most of the filtering work that is done
    using the genericdao lib.

1b) requires some more work that will eventually be dropped, and probably the
work on the fixing needed to make the bridging API work will be comparable to
the 1a) option.

I wouldn’t pick 2) or 3), since it means to become the maintainer of a quite
unrelated project :slight_smile:

I guess that the 1a) option may be the cheaper in the long run.

Cheers,
Emanuele

Alle 17:54:30 di Thursday 8 June 2017, Niels Charlier ha scritto:

Emanuele,

I see three possible options:

  1. Switch to another framework, in which case spring data seems to be
    the obvious choice to me. There are two sub-options
    (a) make a whole new DAO api and immediately modify all the services to
    the work with it → major!
    (b) create a deprecated bridging API so that the services code do not
    all need to be changed at once

  2. Internalise the generic DAO, which would essentially mean copy-paste
    a lot of code from the hibernate-generic-dao library and then I wonder
    if we wouldn’t just better go for option 3

  3. patch the existing library to work with the new hibernate. This could
    potentially actually be the least work of all - possibly not much is
    needed to make it work again, but I’d need more analysis. Then again, it
    must be abandoned for a reason?

DO you agree with my analysis? What do you think of these options? What
is your preference?

Regards
Niels

On 05-06-17 11:08, Emanuele Tajariol wrote:

Hi all,

please also note that, on top of hibernate, GeoFence relies heavily on
the generic-dao library (com.googlecode.genericdao:dao version 1.1.0),
so it should also be checked that it is compatible with the hibernate
version we’ll want to use.

The lib seems to have been automatically migrated here:
https://github.com/based2/hibernate-generic-dao

but there’s no recent activity on it.
Replacing that library in GeoFence will require a major rework of the
persistence and service modules.

Cheers,
Emanuele

Alle 09:54:10 di Monday 5 June 2017, Nuno Oliveira ha scritto:

GeoFence uses GitHub issues:
https://github.com/geoserver/geofence/issues

So at least JDBC 4.0 is required:
https://jdbc.postgresql.org/download.html#archived
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.ht
ml

On 02-06-2017 10:53, Niels Charlier wrote:

question: is there a JIRA for work on geofence’s own modules (not the
ones in geoserver)?

Regards
Niels

On 02-06-17 11:24, Niels Charlier wrote:

Hello Nuno,

On 01-06-17 17:00, Nuno Oliveira wrote:

Hi,

What dependencies are conflicting with recent postgres/postgis stores
and what are actually the issues ?
I don’t actually know… This is the only information that has been
given to me. I could find out though, but I understand you agree with
an upgrade in principle.

Anyway Hibernate 3.6.0.Final was release 7 years ago and has two
major versions on top of it so upgrading to a more recent version is
probably something that should be done:
https://mvnrepository.com/artifact/org.hibernate/hibernate-core

My main concern is the impact on existing installations of GeoFence,
taking in account the commonly used databases (PostgreSQL, Oracle,
…) which versions will still compatible ? Hibernate rely on the
JDBC driver of the database so the question can be rephrased, which
JDBC versions are supported by 3.6.0.Final that are no supported by
5.x ?

From the hibernate website:
"Hibernate 5.2 and later versions require at least Java 1.8 and JDBC
4.2.

Hibernate 5.1 and older versions require at least Java 1.6 and JDBC
4.0."

I found posts via google that suggest hibernate 3.6 supported JDBC3,
but I cannot find any official documentation that confirms this.

I think we could opt for hibernate 5.1 if that makes things more
backwards compatible, because I was asked 5.x

The spatial extension of Hibernate also suffered several changes, do
you see possible incompatibility issues ?
I cannot find documentation that lists migration issues. I am assuming
I will face quite a few issues, but that these can be resolved. I am
hoping that the test coverage is sufficient, so that if I can make
all the tests work again I can assume that it works…

Regards
Niels


– ------ Check out the vibrant tech community on one of the world’s
most engaging tech sites, Slashdot.orghttp://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


– ----- Check out the vibrant tech community on one of the world’s
most engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel



Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Subject: Digest Footer


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


End of Geoserver-devel Digest, Vol 134, Issue 2


On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav <arahav@anonymised.com>
wrote:

Hi Niels,

Geotools is already using JDBC 4.2

Is GeoTools using JDBC 4.2 for all databases already, did you check?
Using hibernate is partly about database independence, I know that the
postgis store
was recently updated, what about the others? (oracle, sqlserver, mysql, H2,
...)

Cheer
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

I should have said Postgres :slight_smile:

···

On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav <arahav@anonymised.com> wrote:

Hi Niels,

Geotools is already using JDBC 4.2

Is GeoTools using JDBC 4.2 for all databases already, did you check?
Using hibernate is partly about database independence, I know that the postgis store
was recently updated, what about the others? (oracle, sqlserver, mysql, H2, …)

Cheer
Andrea

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Taking another look at Hibernate, things might be a bit more complicated.
There is a PR to add some JDBC 4.2 type names - https://github.com/hibernate/hibernate-orm/pull/1940.

We will likely see some version conflict with other Geotools dependencies:
For Oracle the suggestion is to use ojdbc6/7 (JDBC 4.0/4.1), but the hibernate PR from above will pull in ojdbc8.
For MSSQL the suggestion is to use sqljdbc41, however I’ve been using JDBC 4.2 at several clients.
mysql looks to be 4.0, however it might have limited implementation of 4.1.
H2 looks like JDBC3, it might implement JDBC 4.0, however based on the version/age that is probably minimal.

I still think the Geofence work should be done against JDBC 4.2 and not 4.0, however the Geoserver integrated GeoFence version will likely have to wait until that Hibernate PR is merged.

···

On Sun, Jul 2, 2017 at 9:20 AM, Amiram Rahav <arahav@anonymised.com> wrote:

I should have said Postgres :slight_smile:

On Sun, Jul 2, 2017 at 9:15 AM Andrea Aime <andrea.aime@anonymised.com> wrote:

On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav <arahav@anonymised.com> wrote:

Hi Niels,

Geotools is already using JDBC 4.2

Is GeoTools using JDBC 4.2 for all databases already, did you check?
Using hibernate is partly about database independence, I know that the postgis store
was recently updated, what about the others? (oracle, sqlserver, mysql, H2, …)

Cheer
Andrea

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Ami,

In any case, the biggest load of the work will be rewriting the DAO's which needs to be done either way.

I am wondering if it wouldn't be an option to upgrade to hibernate 5.1 /jdbc4 for now, and make a further upgrade later (which would likely require little work anyway).
Just a suggestion.

Kind Regards
Niels

On 02-07-17 19:01, Amiram Rahav wrote:

Taking another look at Hibernate, things might be a bit more complicated.
There is a PR to add some JDBC 4.2 type names - https://github.com/hibernate/hibernate-orm/pull/1940.

We will likely see some version conflict with other Geotools dependencies:
For Oracle the suggestion is to use ojdbc6/7 (JDBC 4.0/4.1), but the hibernate PR from above will pull in ojdbc8.
For MSSQL the suggestion is to use sqljdbc41, however I've been using JDBC 4.2 at several clients.
mysql looks to be 4.0, however it might have limited implementation of 4.1.
H2 looks like JDBC3, it might implement JDBC 4.0, however based on the version/age that is probably minimal.

I still think the Geofence work should be done against JDBC 4.2 and not 4.0, however the Geoserver integrated GeoFence version will likely have to wait until that Hibernate PR is merged.

On Sun, Jul 2, 2017 at 9:20 AM, Amiram Rahav <arahav@anonymised.com <mailto:arahav@anonymised.com>> wrote:

    I should have said Postgres :slight_smile:

    On Sun, Jul 2, 2017 at 9:15 AM Andrea Aime
    <andrea.aime@anonymised.com
    <mailto:andrea.aime@anonymised.com>> wrote:

        On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav
        <arahav@anonymised.com <mailto:arahav@anonymised.com>> wrote:

            Hi Niels,

            Geotools is already using JDBC 4.2

        Is GeoTools using JDBC 4.2 for all databases already, did you
        check?
        Using hibernate is partly about database independence, I know
        that the postgis store
        was recently updated, what about the others? (oracle,
        sqlserver, mysql, H2, ...)

        Cheer
        Andrea

        --

        Regards,

        Andrea Aime

        ==GeoServer Professional Services from the experts! Visit
        http://goo.gl/it488V for more information.==Ing. Andrea Aime
        @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito
        3/A55054 Massarosa (LU)phone: +39 0584 962313
        <tel:+39%200584%20962313>fax: +39 0584 1660272
        <tel:+39%200584%20166%200272>mob: +39 339 8844549
        <tel:+39%20339%20884%204549>http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
        <http://twitter.com/geosolutions_it&gt;

        AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

        Le informazioni contenute in questo messaggio di posta
        elettronica e/o nel/i file/s allegato/i sono da considerarsi
        strettamente riservate. Il loro utilizzo è consentito
        esclusivamente al destinatario del messaggio, per le finalità
        indicate nel messaggio stesso. Qualora riceviate questo
        messaggio senza esserne il destinatario, Vi preghiamo
        cortesemente di darcene notizia via e-mail e di procedere alla
        distruzione del messaggio stesso, cancellandolo dal Vostro
        sistema. Conservare il messaggio stesso, divulgarlo anche in
        parte, distribuirlo ad altri soggetti, copiarlo, od
        utilizzarlo per finalità diverse, costituisce comportamento
        contrario ai principi dettati dal D.Lgs. 196/2003.

        The information in this message and/or attachments, is
        intended solely for the attention and use of the named
        addressee(s) and may be confidential or proprietary in nature
        or covered by the provisions of privacy act (Legislative
        Decree June, 30 2003, no.196 - Italy's New Data Protection
        Code).Any use not in accord with its purpose, any disclosure,
        reproduction, copying, distribution, or either dissemination,
        either whole or partial, is strictly forbidden except previous
        formal approval of the named addressee(s). If you are not the
        intended recipient, please contact immediately the sender by
        telephone, fax or e-mail and delete the information in this
        message that has been received in error. The sender does not
        give any warranty or accept liability as the content, accuracy
        or completeness of sent messages and accepts no responsibility
         for changes made after they were sent or for other risks
        which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

We agree now about the refactoring of the DAO, but do we definitely agree about which version to upgrade to?

I need to make sure everyone is on the same page before I start work.

Ami suggests upgrading the geofence modules to JDBC 4.2, but leave the integrated geofence to work with the older geofence modules until the hibernate PR for jdbc 4.2 has been merged.

Do the maintainers of the geofence modules agree with this plan?

Alternatively, I suggest we could upgrade to jdbc4 for now, since that seems to work with most modules in geotools/geoserver anyway.

Kind Regards
Niels

On 03-07-17 12:01, Niels Charlier wrote:

Ami,

In any case, the biggest load of the work will be rewriting the DAO's which needs to be done either way.

I am wondering if it wouldn't be an option to upgrade to hibernate 5.1 /jdbc4 for now, and make a further upgrade later (which would likely require little work anyway).
Just a suggestion.

Kind Regards
Niels

On 02-07-17 19:01, Amiram Rahav wrote:

Taking another look at Hibernate, things might be a bit more complicated.
There is a PR to add some JDBC 4.2 type names - https://github.com/hibernate/hibernate-orm/pull/1940.

We will likely see some version conflict with other Geotools dependencies:
For Oracle the suggestion is to use ojdbc6/7 (JDBC 4.0/4.1), but the hibernate PR from above will pull in ojdbc8.
For MSSQL the suggestion is to use sqljdbc41, however I've been using JDBC 4.2 at several clients.
mysql looks to be 4.0, however it might have limited implementation of 4.1.
H2 looks like JDBC3, it might implement JDBC 4.0, however based on the version/age that is probably minimal.

I still think the Geofence work should be done against JDBC 4.2 and not 4.0, however the Geoserver integrated GeoFence version will likely have to wait until that Hibernate PR is merged.

On Sun, Jul 2, 2017 at 9:20 AM, Amiram Rahav <arahav@anonymised.com <mailto:arahav@anonymised.com>> wrote:

    I should have said Postgres :slight_smile:

    On Sun, Jul 2, 2017 at 9:15 AM Andrea Aime
    <andrea.aime@anonymised.com
    <mailto:andrea.aime@anonymised.com>> wrote:

        On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav
        <arahav@anonymised.com <mailto:arahav@anonymised.com>> wrote:

            Hi Niels,

            Geotools is already using JDBC 4.2

        Is GeoTools using JDBC 4.2 for all databases already, did you
        check?
        Using hibernate is partly about database independence, I know
        that the postgis store
        was recently updated, what about the others? (oracle,
        sqlserver, mysql, H2, ...)

        Cheer
        Andrea

        --
        Regards,

        Andrea Aime

        ==GeoServer Professional Services from the experts! Visit
        http://goo.gl/it488V for more information.==Ing. Andrea Aime
        @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito
        3/A55054 Massarosa (LU)phone: +39 0584 962313
        <tel:+39%200584%20962313>fax: +39 0584 1660272
        <tel:+39%200584%20166%200272>mob: +39 339 8844549
<tel:+39%20339%20884%204549>http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
        <http://twitter.com/geosolutions_it&gt;

        AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

        Le informazioni contenute in questo messaggio di posta
        elettronica e/o nel/i file/s allegato/i sono da considerarsi
        strettamente riservate. Il loro utilizzo è consentito
        esclusivamente al destinatario del messaggio, per le finalità
        indicate nel messaggio stesso. Qualora riceviate questo
        messaggio senza esserne il destinatario, Vi preghiamo
        cortesemente di darcene notizia via e-mail e di procedere alla
        distruzione del messaggio stesso, cancellandolo dal Vostro
        sistema. Conservare il messaggio stesso, divulgarlo anche in
        parte, distribuirlo ad altri soggetti, copiarlo, od
        utilizzarlo per finalità diverse, costituisce comportamento
        contrario ai principi dettati dal D.Lgs. 196/2003.

        The information in this message and/or attachments, is
        intended solely for the attention and use of the named
        addressee(s) and may be confidential or proprietary in nature
        or covered by the provisions of privacy act (Legislative
        Decree June, 30 2003, no.196 - Italy's New Data Protection
        Code).Any use not in accord with its purpose, any disclosure,
        reproduction, copying, distribution, or either dissemination,
        either whole or partial, is strictly forbidden except previous
        formal approval of the named addressee(s). If you are not the
        intended recipient, please contact immediately the sender by
        telephone, fax or e-mail and delete the information in this
        message that has been received in error. The sender does not
        give any warranty or accept liability as the content, accuracy
        or completeness of sent messages and accepts no responsibility
         for changes made after they were sent or for other risks
        which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

I think that regardless of what we do we will have version conflicts with the integrated version. There isn’t a really simple/easy way around that.

For the stand alone version, I think it’s safe to go with the latest version, however will defer to the geofence modules maintainers on this.

Thanks,
Ami.

···

On Tue, Jul 18, 2017 at 11:03 AM, Niels Charlier <niels@anonymised.com> wrote:

We agree now about the refactoring of the DAO, but do we definitely agree about which version to upgrade to?

I need to make sure everyone is on the same page before I start work.

Ami suggests upgrading the geofence modules to JDBC 4.2, but leave the integrated geofence to work with the older geofence modules until the hibernate PR for jdbc 4.2 has been merged.

Do the maintainers of the geofence modules agree with this plan?

Alternatively, I suggest we could upgrade to jdbc4 for now, since that seems to work with most modules in geotools/geoserver anyway.

Kind Regards
Niels

On 03-07-17 12:01, Niels Charlier wrote:

Ami,

In any case, the biggest load of the work will be rewriting the DAO’s which needs to be done either way.

I am wondering if it wouldn’t be an option to upgrade to hibernate 5.1 /jdbc4 for now, and make a further upgrade later (which would likely require little work anyway).
Just a suggestion.

Kind Regards
Niels

On 02-07-17 19:01, Amiram Rahav wrote:

Taking another look at Hibernate, things might be a bit more complicated.
There is a PR to add some JDBC 4.2 type names - https://github.com/hibernate/hibernate-orm/pull/1940 https://github.com/hibernate/hibernate-orm/pull/1940.

We will likely see some version conflict with other Geotools dependencies:
For Oracle the suggestion is to use ojdbc6/7 (JDBC 4.0/4.1), but the hibernate PR from above will pull in ojdbc8.
For MSSQL the suggestion is to use sqljdbc41, however I’ve been using JDBC 4.2 at several clients.
mysql looks to be 4.0, however it might have limited implementation of 4.1.
H2 looks like JDBC3, it might implement JDBC 4.0, however based on the version/age that is probably minimal.

I still think the Geofence work should be done against JDBC 4.2 and not 4.0, however the Geoserver integrated GeoFence version will likely have to wait until that Hibernate PR is merged.

On Sun, Jul 2, 2017 at 9:20 AM, Amiram Rahav <arahav@anonymised.com mailto:arahav@anonymised.comcom> wrote:

I should have said Postgres :slight_smile:

On Sun, Jul 2, 2017 at 9:15 AM Andrea Aime
<andrea.aime@anonymised.com
mailto:andrea.aime@anonymised.comsolutions.it> wrote:

On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav
<arahav@anonymised.com mailto:arahav@anonymised.comcom> wrote:

Hi Niels,

Geotools is already using JDBC 4.2

Is GeoTools using JDBC 4.2 for all databases already, did you
check?
Using hibernate is partly about database independence, I know
that the postgis store
was recently updated, what about the others? (oracle,
sqlserver, mysql, H2, …)

Cheer
Andrea


Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.==Ing. Andrea Aime
@geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito
3/A55054 Massarosa (LU)phone: +39 0584 962313
tel:+39%200584%20962313fax: +39 0584 1660272
tel:+39%200584%20166%200272mob: +39 339 8844549
tel:+39%20339%20884%204549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta
elettronica e/o nel/i file/s allegato/i sono da considerarsi
strettamente riservate. Il loro utilizzo è consentito
esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro
sistema. Conservare il messaggio stesso, divulgarlo anche in
parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento
contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is
intended solely for the attention and use of the named
addressee(s) and may be confidential or proprietary in nature
or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy’s New Data Protection
Code).Any use not in accord with its purpose, any disclosure,
reproduction, copying, distribution, or either dissemination,
either whole or partial, is strictly forbidden except previous
formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this
message that has been received in error. The sender does not
give any warranty or accept liability as the content, accuracy
or completeness of sent messages and accepts no responsibility
for changes made after they were sent or for other risks
which arise as a result of e-mail transmission, viruses, etc.


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! [http://sdm.link/slashdot](http://sdm.link/slashdot)
_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@anonymised.com366...sourceforge.net](mailto:Geoserver-devel@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)

Hi Niels,

This thread as a lot of interesting information (thanks for the extra info Ami). That said, I think that to make
a decision we need a summarized description of what are the options \ alternatives and what are the
consequences of those choices (who will this affect users and current installations).

Unless I’m missing something, any upgrade on the standalone GeoFence version will also affect the integrated one no ?

Regards,

Nuno Oliveira

···

On 07/18/2017 04:03 PM, Niels Charlier wrote:

-- 
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit [http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_it](http://twitter.com/geosolutions_it)

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

We agree now about the refactoring of the DAO, but do we definitely agree about which version to upgrade to?

I need to make sure everyone is on the same page before I start work.

Ami suggests upgrading the geofence modules to JDBC 4.2, but leave the integrated geofence to work with the older geofence modules until the hibernate PR for jdbc 4.2 has been merged.

Do the maintainers of the geofence modules agree with this plan?

Alternatively, I suggest we could upgrade to jdbc4 for now, since that seems to work with most modules in geotools/geoserver anyway.

Kind Regards
Niels

On 03-07-17 12:01, Niels Charlier wrote:

Ami,

In any case, the biggest load of the work will be rewriting the DAO’s which needs to be done either way.

I am wondering if it wouldn’t be an option to upgrade to hibernate 5.1 /jdbc4 for now, and make a further upgrade later (which would likely require little work anyway).
Just a suggestion.

Kind Regards
Niels

On 02-07-17 19:01, Amiram Rahav wrote:

Taking another look at Hibernate, things might be a bit more complicated.
There is a PR to add some JDBC 4.2 type names - https://github.com/hibernate/hibernate-orm/pull/1940 https://github.com/hibernate/hibernate-orm/pull/1940.

We will likely see some version conflict with other Geotools dependencies:
For Oracle the suggestion is to use ojdbc6/7 (JDBC 4.0/4.1), but the hibernate PR from above will pull in ojdbc8.
For MSSQL the suggestion is to use sqljdbc41, however I’ve been using JDBC 4.2 at several clients.
mysql looks to be 4.0, however it might have limited implementation of 4.1.
H2 looks like JDBC3, it might implement JDBC 4.0, however based on the version/age that is probably minimal.

I still think the Geofence work should be done against JDBC 4.2 and not 4.0, however the Geoserver integrated GeoFence version will likely have to wait until that Hibernate PR is merged.

On Sun, Jul 2, 2017 at 9:20 AM, Amiram Rahav <arahav@anonymised.com mailto:arahav@anonymised.com> wrote:

I should have said Postgres :slight_smile:

On Sun, Jul 2, 2017 at 9:15 AM Andrea Aime
<andrea.aime@anonymised.com
mailto:andrea.aime@anonymised.com> wrote:

On Sun, Jul 2, 2017 at 3:04 PM, Amiram Rahav
<arahav@anonymised.com mailto:arahav@anonymised.com> wrote:

Hi Niels,

Geotools is already using JDBC 4.2

Is GeoTools using JDBC 4.2 for all databases already, did you
check?
Using hibernate is partly about database independence, I know
that the postgis store
was recently updated, what about the others? (oracle,
sqlserver, mysql, H2, …)

Cheer
Andrea


Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.==Ing. Andrea Aime
@geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito
3/A55054 Massarosa (LU)phone: +39 0584 962313
tel:+39%200584%20962313fax: +39 0584 1660272
tel:+39%200584%20166%200272mob: +39 339 8844549
tel:+39%20339%20884%204549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta
elettronica e/o nel/i file/s allegato/i sono da considerarsi
strettamente riservate. Il loro utilizzo è consentito
esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro
sistema. Conservare il messaggio stesso, divulgarlo anche in
parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento
contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is
intended solely for the attention and use of the named
addressee(s) and may be confidential or proprietary in nature
or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy’s New Data Protection
Code).Any use not in accord with its purpose, any disclosure,
reproduction, copying, distribution, or either dissemination,
either whole or partial, is strictly forbidden except previous
formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this
message that has been received in error. The sender does not
give any warranty or accept liability as the content, accuracy
or completeness of sent messages and accepts no responsibility
for changes made after they were sent or for other risks
which arise as a result of e-mail transmission, viruses, etc.


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! [http://sdm.link/slashdot](http://sdm.link/slashdot)
_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@lists.sourceforge.net](mailto:Geoserver-devel@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! [http://sdm.link/slashdot](http://sdm.link/slashdot)
_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@lists.sourceforge.net](mailto:Geoserver-devel@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)

Hi Nuno,

This thread as a lot of interesting information (thanks for the extra info Ami). That said, I think that to make
a decision we need a summarized description of what are the options \ alternatives and what are the
consequences of those choices (who will this affect users and current installations).

I had another look, and I don't think there is much reason to stick with 4.1. I actually think that 4.2 is compatible with versions that support 4.1, that is what a lot of the driver specs seem to suggest.

for geotools:

postgres uses version 42.1.1, which supports jdbc 4.1 and 4.2 according to specs

mysql uses version 5.1.17, which supports jdbc 4.1 and 4.2 according to specs

h2 1.1.119, is an old version -> might need to upgrade to newest, then it should work with 4.1 and 4.2

spatialite 3.7.2 -> unclear, upgrade to newer version might be necessary

db2 must add manually, but "db2jcc4.jar - This driver is based on the JDBC 4 or later specifications"

oracle must add driver manually, why not use 4.2?

mssql must add driver manually, why not use 4.2?

teradata must add driver manually, why not use most recent one?

for geoserver:

jdbcstore and jdbcconfig: they use postgres or H2, we will need same upgrade for h2

jdbc-metrics: again h2

So the way I understand it, it shouldn't give too much problems. An upgrade of H2 (and possibly spatialite) should be sufficient I think !?

Unless I'm missing something, any upgrade on the standalone GeoFence version will also affect the integrated one no ?

I think Ami's suggestion was to keep geofence-server running on an older version of geofence.

However, now I think of it, unless we upgrade the geofence client module, the new stand-alone version won't be very useful. And if we upgrade the geofence client module, we must also upgrade the geofence-server module ... so I guess you are right, this is not an option, or at least not a very straight-forward one.

Regards
Niels

On Mon, Jul 24, 2017 at 6:08 PM, Niels Charlier <niels@anonymised.com> wrote:

h2 1.1.119, is an old version -> might need to upgrade to newest, then it
should work with 4.1 and 4.2

Upgrade is a major can of worms, that's why we haven't upgraded yet...
The database format of the latest versions is unfortunately incompatible.
Basically, you'll need to find a way to transparently upgrade the H2
databases of all existing data directories (last time I looked
I could not find a transparent upgrade tool, it may need to be built).

H2 is being used, going by memory, for disk quota, for KML superoverlays,
for NetCDF indexes, jdbconfig,
maybe monitoring too... am I forgetting anything?
All of them are not quite visible to users, and all need a safe upgrade
path if you change the H2 version
(and instructions to backup everything, because going back won't be
possible).

Cheers
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

On Mon, Jul 24, 2017 at 6:17 PM, Andrea Aime <andrea.aime@anonymised.com>
wrote:

Basically, you'll need to find a way to transparently upgrade the H2
databases of all existing data directories (last time I looked
I could not find a transparent upgrade tool, it may need to be built).

Hum... the download page has this "database upgrade helper file" though:

http://www.h2database.com/html/download.html

Maybe there is hope? :slight_smile:

Cheers
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

Ouch that is nasty :open_mouth:

But are we sure that h2 doesn't work with jdbc 4.2? I mean, how does it work otherwise with java8 anyways? I'm a bit confused about that. Are people required to replace their jdbc driver with an older version when they run geoserver on java8? Or am I missing something?

Niels

On 24-07-17 18:17, Andrea Aime wrote:

On Mon, Jul 24, 2017 at 6:08 PM, Niels Charlier <niels@anonymised.com <mailto:niels@anonymised.com>> wrote:

    h2 1.1.119, is an old version -> might need to upgrade to newest,
    then it should work with 4.1 and 4.2

Upgrade is a major can of worms, that's why we haven't upgraded yet...
The database format of the latest versions is unfortunately incompatible.
Basically, you'll need to find a way to transparently upgrade the H2 databases of all existing data directories (last time I looked
I could not find a transparent upgrade tool, it may need to be built).

H2 is being used, going by memory, for disk quota, for KML superoverlays, for NetCDF indexes, jdbconfig,
maybe monitoring too... am I forgetting anything?
All of them are not quite visible to users, and all need a safe upgrade path if you change the H2 version
(and instructions to backup everything, because going back won't be possible).

Cheers
Andrea

--

Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.==Ing. Andrea Aime @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A55054 Massarosa (LU)phone: +39 0584 962313fax: +39 0584 1660272mob: +39 339 8844549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Mon, Jul 24, 2017 at 6:29 PM, Niels Charlier <niels@anonymised.com> wrote:

Ouch that is nasty :open_mouth:

But are we sure that h2 doesn't work with jdbc 4.2? I mean, how does it
work otherwise with java8 anyways? I'm a bit confused about that. Are
people required to replace their jdbc driver with an older version when
they run geoserver on java8? Or am I missing something?

GeoServer does not rely on the new methods in JDBC 4.2, so no calls, no
problem, I believe. But, start adding something that uses a 4.2 method, and
watch the fireworks explode :-p

Cheers
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

Ok, so the conflict is purely between hibernate which calls jdbc 4.2 methods and H2. As long as we are stuck with these H2 database we are stuck with hibernate < 4.

That is indeed a very big problem then. Geofence-server also uses H2. That is the biggest roadblock for this upgrade.

And I can’t find any documentation or explanation about the migration file, it is just a jar library.

Regards

Niels

···

On 24-07-17 18:34, Andrea Aime wrote:

On Mon, Jul 24, 2017 at 6:29 PM, Niels Charlier <niels@…2918…> wrote:

Ouch that is nasty :open_mouth:

But are we sure that h2 doesn’t work with jdbc 4.2? I mean, how does it work otherwise with java8 anyways? I’m a bit confused about that. Are people required to replace their jdbc driver with an older version when they run geoserver on java8? Or am I missing something?

GeoServer does not rely on the new methods in JDBC 4.2, so no calls, no problem, I believe. But, start adding something that uses a 4.2 method, and watch the fireworks explode :-p

Cheers
Andrea

Regards,

Andrea Aime

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Tue, Jul 25, 2017 at 10:05 AM, Niels Charlier <niels@anonymised.com> wrote:

And I can't find any documentation or explanation about the migration
file, it is just a jar library.

Yeah, that's what had me stumped as well!
On some forums, I read that as long as you have the jars in the classpath,
the migration happens on open...
that would be ideal, but needs trying. See also this, the first answer is
by the H2 main developer:
https://stackoverflow.com/questions/15094815/how-to-check-if-a-h2-database-needs-to-be-upgraded

At the same time, I've found this... and wondering why anyone wrote it, if
the migration is transparent
(maybe it does not work transparently, or maybe they were as confused as
us):

https://github.com/gitbucket/h2-migration

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

I can try that H2 migration again, but my first attempt was not really successful.

I had to replace H2 for integrated geofence to work correctly. with the current version the more rules you have, the more likely that an insert of a new rule will fail.
Using latest H2 did work, but ended up having to recreate all the rules.

Another issue with H2 is that it has a dependency on geodb (geotools), that will have to be replaced with H2 GIS, or spatial support will have to be dropped.

I’ve used JDBC 4.2 with mssql 2016 without noticing any issues, but I didn’t run any of the GT/GS tests :slight_smile:

···

On Tue, Jul 25, 2017 at 10:05 AM, Niels Charlier <niels@anonymised.com> wrote:

And I can’t find any documentation or explanation about the migration file, it is just a jar library.

Yeah, that’s what had me stumped as well!
On some forums, I read that as long as you have the jars in the classpath, the migration happens on open…
that would be ideal, but needs trying. See also this, the first answer is by the H2 main developer:
https://stackoverflow.com/questions/15094815/how-to-check-if-a-h2-database-needs-to-be-upgraded

At the same time, I’ve found this… and wondering why anyone wrote it, if the migration is transparent
(maybe it does not work transparently, or maybe they were as confused as us):

https://github.com/gitbucket/h2-migration

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Tue, Jul 25, 2017 at 3:55 PM, Amiram Rahav <arahav@anonymised.com>
wrote:

Another issue with H2 is that it has a dependency on geodb (geotools),
that will have to be replaced with H2 GIS, or spatial support will have to
be dropped.

Oh dear, you're right, H2 now has native geometry support (even without H2
GIS, which adds functions on top as far as I know),
hopefully geodb can coexist, otherwise we'd be in even more troubles (at
least superoverlays are using spatial support,
as far as I know)

Cheers
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

An update on this issue:

I have tested the migration jar file and it did a succesfull, automatic upgrade for disk quota, jdbcconfig, jdbcstore, geofence-server and monitoring. It failed for a netcdf datastore (the upgrade stopped with an exception), however the good thing about netcdf is that you can simply delete it and it rebuilds automatically so it is less crucial (and could be perhaps automated in this way). I did however not test KML superoverlays (not particularly familiar with it). As a side note, monitoring is not compatible with geofence-server because of a different hibernate version, something that should ideally be resolved.

I think this is a rather positive result. On the downside, there are a lot of test failures. But they all seem to be related to the same thing, databases not being closed properly before they are opened again. That should be resolvable.

Also, who maintains jdbc-spatialite or knows something about it? I am not clear on whether this one is compatible with JDBC4.X. I don't know anything about it and google can't give me an answer. All the rest should be fine.

Kind Regards
Niels

On 25-07-17 10:12, Andrea Aime wrote:

On Tue, Jul 25, 2017 at 10:05 AM, Niels Charlier <niels@anonymised.com <mailto:niels@anonymised.com>> wrote:

    And I can't find any documentation or explanation about the
    migration file, it is just a jar library.

Yeah, that's what had me stumped as well!
On some forums, I read that as long as you have the jars in the classpath, the migration happens on open...
that would be ideal, but needs trying. See also this, the first answer is by the H2 main developer:
https://stackoverflow.com/questions/15094815/how-to-check-if-a-h2-database-needs-to-be-upgraded

At the same time, I've found this... and wondering why anyone wrote it, if the migration is transparent
(maybe it does not work transparently, or maybe they were as confused as us):

https://github.com/gitbucket/h2-migration

Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.==Ing. Andrea Aime @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A55054 Massarosa (LU)phone: +39 0584 962313fax: +39 0584 1660272mob: +39 339 8844549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Tue, Aug 29, 2017 at 12:32 AM, Niels Charlier <niels@anonymised.com> wrote:

An update on this issue:

I have tested the migration jar file and it did a succesfull, automatic
upgrade for disk quota, jdbcconfig, jdbcstore, geofence-server and
monitoring. It failed for a netcdf datastore (the upgrade stopped with an
exception), however the good thing about netcdf is that you can simply
delete it and it rebuilds automatically so it is less crucial (and could be
perhaps automated in this way). I did however not test KML superoverlays
(not particularly familiar with it). As a side note, monitoring is not
compatible with geofence-server because of a different hibernate version,
something that should ideally be resolved.

I think this is a rather positive result. On the downside, there are a lot
of test failures. But they all seem to be related to the same thing,
databases not being closed properly before they are opened again. That
should be resolvable.

Also, who maintains jdbc-spatialite or knows something about it?

Justin is the current maintainer. The module did not receive changes in a
while:
https://github.com/geotools/geotools/commits/master/modules/plugin/jdbc/jdbc-spatialite/src

I see there is a fork of the base library here, does not support OSX but
uses a more recent version of
the Xerial driver... not sure if that helps or not though:

https://github.com/benstadin/spatialite4-jdbc

I am not clear on whether this one is compatible with JDBC4.X. I don't
know anything about it and google can't give me an answer. All the rest
should be fine.

Again, not sure, googling I found this:
https://bitbucket.org/xerial/sqlite-jdbc/branch/feature/jdbc4

These commits are from 2014, Justin's sqllite-jdbc is older than that, so
maybe there is indeed an issue there.

Cheers
Andrea

--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

Hi,
separate mail for the upgrade tests.

···

On Tue, Aug 29, 2017 at 10:18 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

This seems promising. NetCDF wise, the worry I have is that these files are sprinkled around on the file system,
sidecars to the netcdf files themselves. Wondering if the removal and rebuild could be automated?

The other issue is that the upgrade will make it impossible to move back, while this is unavoidable, it needs to be
well advertised. And it will cause pain for a year long for developers jumping across branches (e.g., everybody
working in the GeoServer stable/maintenance branches).
I’m afraid it’s a bridge we’ll have to cross sooner or later… hum… thinking out loud, would it make sense to create parallel databases,
old version and new version, with a different name? I guess the pain is that this would require point by point changes in the code…

Cherees
Andrea

On Tue, Aug 29, 2017 at 12:32 AM, Niels Charlier <niels@anonymised.com> wrote:

An update on this issue:

I have tested the migration jar file and it did a succesfull, automatic upgrade for disk quota, jdbcconfig, jdbcstore, geofence-server and monitoring. It failed for a netcdf datastore (the upgrade stopped with an exception), however the good thing about netcdf is that you can simply delete it and it rebuilds automatically so it is less crucial (and could be perhaps automated in this way).

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.