On Wed, Feb 7, 2018 at 12:04 AM, Torben Barsballe <
[email protected]> wrote:

> Continuing from discussions in todays PMC meeting:
>
> We currently have a proposal tracking Java 9 compatibility here:
> https://github.com/geotools/geotools/wiki/Java-9-Compatibility
> I have updated it with more details.
> The is also a PR containing a number of preliminary changes required for
> Java 9 Compatibility awaiting review here: https://github.com/
> geotools/geotools/pull/1798
>

Added a quick review.

Also tried to look into imagemosaic build failures by removing the surefire
properties and adding jaxb and activation dependencies.
There is something strange going on, found at least the following patch
fixing one of the failures, but I don't understand how it's working, to
start with,
when direct access to jaxb is allowed:

diff --git
a/modules/plugin/imagemosaic/src/main/java/org/geotools/gce/imagemosaic/catalog/AbstractGTDataStoreGranuleCatalog.java
b/modules/plugin/imagemosaic/src/main/java/org/geotools/gce/imagemosaic/catalog/AbstractGTDataStoreGranuleCatalog.java
index bfe484e..1c92cc6 100644
---
a/modules/plugin/imagemosaic/src/main/java/org/geotools/gce/imagemosaic/catalog/AbstractGTDataStoreGranuleCatalog.java
+++
b/modules/plugin/imagemosaic/src/main/java/org/geotools/gce/imagemosaic/catalog/AbstractGTDataStoreGranuleCatalog.java
@@ -113,9 +113,15 @@ abstract class AbstractGTDataStoreGranuleCatalog
extends GranuleCatalog {
             this.pathType = (PathType) params.get(Utils.Prop.PATH_TYPE);
@@ -113,9 +113,15 @@ abstract class AbstractGTDataStoreGranuleCatalog
extends GranuleCatalog {
             this.pathType = (PathType) params.get(Utils.Prop.PATH_TYPE);
             this.locationAttribute = (String)
params.get(Utils.Prop.LOCATION_ATTRIBUTE);
             final String temp = (String)
params.get(Utils.Prop.SUGGESTED_SPI);
-            this.suggestedRasterSPI = temp != null
-                    ? (ImageReaderSpi) Class.forName(temp).newInstance() :
null;
-            this.parentLocation = (String)
params.get(Utils.Prop.PARENT_LOCATION);
+            try {
+                this.suggestedRasterSPI = temp != null
+                        ? (ImageReaderSpi)
Class.forName(temp).newInstance() : null;
+                this.parentLocation = (String)
params.get(Utils.Prop.PARENT_LOCATION);
+            } catch (Exception e) {
+                // under Java 9 the code can get a hold of a SPI that
cannot then be instantiated
+                LOGGER.log(Level.FINE, "Could not create suggested reader
SPI class, might be due to Java 9 module system", e);
+                this.suggestedRasterSPI = null;
+            }
             if (params.containsKey(Utils.Prop.HETEROGENEOUS)) {
                 this.heterogeneous = (Boolean)
params.get(Utils.Prop.HETEROGENEOUS);
             }

The thing is, when the preferred SPI is set to some "com.sun.imageio...."
class, it should not matter if the jaxb and activation are
allowed or not, com.sun.imageio isn't.... some I'm wondering if some wires
are crossing in the java module system itself, that
allows access to more packages than then one explicitly listed.

Then I have more weird behavior, like tests failing in maven under jdk 9
but passing in the IDE, using the same JDK.
I don't have nearly enough spare time to look into this, it feels like it
could be work of days.

Cheers
Andrea

==

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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to