agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC
Date: Mon, 26 Dec 2011 14:40:25 -0800
Message-ID: <B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com> (raw)

So, I've managed to install PL/Java and most things seem to be running correctly.  However, when I try to run the examples, I get the following exception:

org.postgresql.util.PSQLException: ERROR: java.lang.SecurityException: read on /usr/share/javazi/UTC
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
	at org.postgresql.pljava.test.Tester.testTimestamp(Tester.java:532)
	at org.postgresql.pljava.test.Tester.testParameters(Tester.java:289)
	at org.postgresql.pljava.test.Tester.main(Tester.java:227)

Poking around a bit, I couldn't find anything regarding this error, although perhaps it does seem to be related to the fact that Java is running as a trusted language.  However, I wanted to be sure I understood what is going on here, and what the is the correct diagnosis.  This error seems to be caused by the normal, underlying Java mechanism for dealing with timezones.  As such, reading this file would seem to be the correct functioning of the system.  It seems a little odd that the underlying system's required reading from the file system would throw a security exception.  I can certainly understand if this was non-system code, but I would have thought the correct permissions were ensured by the system code.

So, am I reading this error correctly?  Will I be required to run the test example of PL/Java as untrusted code?  If I'm doing something wrong, or may have set something up incorrectly, please let me know.  It would be useful to understand what's going on here.  There does not seem to be anything printed out in the postgres logs other than:

2011-12-26 14:05:44.740 PST,"postgres","core-650-test",5356,"127.0.0.1:50820",4ef8efb8.14ec,2,"SELECT",2011-12-26 14:05:44 PST,3/13,0,ERROR,XX000,"java.lang.SecurityException: read on /usr/share/javazi/UTC",,,,,,"SELECT print(current_time)",,,""

Thanks



view thread (4+ messages)  latest in thread

Message-ID: <B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com>
Permalink:  ../B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com/
Also on:    postgresql.org/message-id/B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC
  In-Reply-To: <B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox