Weird error with PostGIS on master branch

13 views
Skip to first unread message

scottie

unread,
Jul 11, 2018, 10:25:09 AM7/11/18
to GeoScript
Jared,

I just started getting a weird issue when using PostGIS workspace on the master branch.

Attached is the snippet and stacktrace.   The gist of it is that it can't seem to load the 
JDBC driver due to a security constraint.    Funny thing is,  I'm using Java 8,  not 9+.

Could GeoTools be compile w/Java 9+?  It seems like it only started happening a few
days ago.   GeoScript 1.11.0 is fine.  Anyways,  was wondering if you've experienced 
anything similar?


Thanks,
--scottie
wtf.groovy
stacktrace.txt

Jared Erickson

unread,
Jul 14, 2018, 11:35:27 PM7/14/18
to GeoScript Google Group
I am getting the same error:

java.lang.SecurityException: Prohibited package name: java.sql
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:662)
at java.lang.ClassLoader.defineClass(ClassLoader.java:761)

I haven't figured out what is going on. Maybe we should report it to the Geotools project?

Cheers,
Jared

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+unsubscribe@googlegroups.com
Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrea Aime

unread,
Jul 15, 2018, 12:10:23 AM7/15/18
to geos...@googlegroups.com
Are you running on Java 9? GeoTools won't work on it.
However given the error... has GeoScript any of its own classes in the java.sql package? That's also something not allowed anymore since Java 9

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 ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Jared Erickson

unread,
Jul 15, 2018, 1:14:18 PM7/15/18
to GeoScript Google Group
We are both on Java 8.  It appears that hatbox-1.0.b10.jar has java.sql package for three classes (NClob, RowId, and SQLXML).

Jared

Jared Erickson

unread,
Jul 15, 2018, 1:15:04 PM7/15/18
to GeoScript Google Group

Andrea Aime

unread,
Jul 15, 2018, 2:01:56 PM7/15/18
to geos...@googlegroups.com
Hum... no clue then... the jar has been recently updated to JTS 1.15.1, not sure if you're running that already,
and if the upgrade/repackaging might be at fault, or not.

Cheers
Andrea

Jared Erickson

unread,
Jul 15, 2018, 9:18:33 PM7/15/18
to GeoScript Google Group
I can confirm that the hatbox jar is the problem.  When I remove hatbox from the classpath, I can connect to postgresql again.

I tried compiling https://github.com/jodygarnett/hatbox with Java 8 but ran into the same java.sql error.  I am going to try refactoring the java.sql classes in the hatbox project, but I am not sure that is possible.  I assume geotools is going to have the same problem.

Jared


jericks

unread,
Jul 15, 2018, 11:33:43 PM7/15/18
to GeoScript
OK, I think I have a solution.  The java.sql package in the hatbox project was there to support java 1.5.  If you remove that package and upgrade the java compiler version to 1.6, I can connect to PostGIS.  I created an issue:


Cheers,
Jared

scott bortman

unread,
Jul 16, 2018, 10:10:06 AM7/16/18
to geos...@googlegroups.com
Have you guys seen http://www.h2gis.org/ ?
I wonder what the differences are between the 
current H2 support and that?   I don't think they 
are compatible.  Just curious.

To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

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 ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

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 ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com

Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org

---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.

Andrea Aime

unread,
Jul 16, 2018, 2:26:19 PM7/16/18
to geos...@googlegroups.com
Indeed they are not compatible. The current H2 support was developed as "work of love", in spare time, years ago.
Justin now left the project, others got older, got families, and have very little spare time left.
Also, switching to H2Gis presents backwards compatibility problems, we would need a newer version of H2, which has a different binary format, and the table layout would be different, meaning we would break the many image missics using H2 as the mosaic index (basically a given for anyone using NetCDF files).
H2 is also used in other parts of the code.
So to upgrade we'd have to prepare a migration path, possibly automatic, between different database versions and different spatial extensions, which is not trivial at all ( I think eventually we'll have to settle to at least partially manual).

In parallel we have other more pressing but equally unfunded issues... Long story short, I don't see this happening anytime soon unless someone shows up to fund this switch, so that it can be dealt with during working hours...

Cheers
Andrea

scott bortman

unread,
Jul 16, 2018, 2:43:20 PM7/16/18
to geos...@googlegroups.com
Andrea,

Thanks for the bit of background info on GeoDB.   I know what that is like 
(both the time factor and funding  :-)).

It would be an interesting side project to not replace but provide an alternative
H2 GeoScript Workspace (as well as add support for a few other ones like 
MongoDB or ElasticSearch as they have some GeoTools implementations I think).

Take care,
--scottie


jericks

unread,
Jul 23, 2018, 8:58:33 PM7/23/18
to GeoScript
Just to follow up, I created an issue and sent a pull request to the forked version of hatbox geotools appears to be using:


Cheers,
Jared
Reply all
Reply to author
Forward
0 new messages