Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1

From: Christoph Berg <myon(at)debian(dot)org>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: pgsql-pkg-debian(at)postgresql(dot)org, pgsql-pkg-yum(at)postgresql(dot)org
Subject: Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1
Date: 2018-11-08 21:42:56
Message-ID: 20181108214256.GC21984@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian pgsql-pkg-yum pljava-dev

Re: Chapman Flack 2018-11-07 <5BE32DAE(dot)7090508(at)anastigmatix(dot)net>
> > There's still a problem, though. Jessie, 9.3, OpenJDK 7:
> >
> > ERROR: java.lang.SecurityException: read on /usr/share/javazi/Europe/Prague
> > STATEMENT: SELECT sqlj.install_jar('file:/usr/share/postgresql/9.3/pljava/pljava-examples-1.5.2.jar', 'examples', true)
>
> Hmm. Does that happen only on Jessie? Is there a debianism where zoneinfo
> files for Java are distributed in this other location instead of under
> $JAVA_HOME ?

Trusty has the same problem.

Both ship with a "tzdata-java" package that has timezone info in that
location. Newer Java apparently use the standard TZ database in
/usr/share/zoneinfo/. (The only java-specific thing I could find was
-rw-r--r-- 1 root root 105882 Okt 17 09:31 /usr/lib/jvm/java-11-openjdk-amd64/lib/tzdb.dat )

> At present, the security manager for "trusted" PL/Java doesn't offer any
> easy way to configure additional filesystem locations that are ok to read
> from. I'm working on that for a future version, but that doesn't help here.
>
> I suspect it could be made to work by adding
> trust=org.postgresql.pljava.annotation.Function.Trust.UNSANDBOXED
> in the @Function annotation on the issue199() method in
> pljava-examples/src/main/java/org/postgresql/pljava/example/annotation/PreJSR310.java
>
> However, it is only a regression test, and it is probably simpler just to
> build with a patch to not run it (say, by removing the @SQLAction annotation
> at the top of that file). That's preferable to adding UNSANDBOXED willy
> nilly to things in the examples jar that people may casually install.

Hmm, just not building pljava on the older dists looks more and more
attractive...

> This is good for me to know about, as I was thinking of changing PL/Java's
> behavior in a future release to set Java's timezone to match the PG
> session's by default. Now I know not to do that until there is a way to
> accommodate zoneinfo from atypical locations.

Well, the location is typical for Java 7 on Debian. If it's still a
problem with Java 8+, I'd claim Java should be patched to recognize it
as "normal".

Christoph

In response to

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message apt.postgresql.org repository 2018-11-09 11:40:43 postgresql-pljava updated to version 1.5.2-1.pgdg+1
Previous Message apt.postgresql.org repository 2018-11-08 09:50:20 postgresql-9.3 updated to version 9.3.25-1.pgdg+1

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Chatterjee, Satyajit 2018-11-09 09:53:50 Missing RHEL rpm(pg_catcheck-11) in postgres 11 repo.
Previous Message Paul Ramsey 2018-11-07 18:41:05 Re: error creating postgis25 extension on postgis 11

Browse pljava-dev by date

  From Date Subject
Next Message Achilleas Mantzios 2018-11-15 13:38:42 [Pljava-dev] FreeBSD failed: /usr/local/openjdk8/jre/lib/amd64/server/libjvm.so: Undefined symbol "pthread_set_name_np"
Previous Message Chapman Flack 2018-11-07 18:23:42 Re: PL/Java 1.5.2 - fixes one regression in date conversion in 1.5.1