[Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC

From: hal(dot)hildebrand at gmail(dot)com (Hal Hildebrand)
To:
Subject: [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC
Date: 2011-12-26 23:28:58
Message-ID: 9CDF09DD-9423-49D6-874C-3100A4A49FEC@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Tried this out using javau as the language and that does, in fact, solve the permission problem -i.e. I get no error when using javau. So the question is whether this is the expected behavior. I'm thinking no, because this was in the test example and should work. Thus the question is why I'm running into this #fail...

On Dec 26, 2011, at 2:40 PM, Hal Hildebrand wrote:

> 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

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Bear Giles 2011-12-27 03:41:11 [Pljava-dev] testing for equality in user-defined types in select statements
Previous Message Hal Hildebrand 2011-12-26 22:40:25 [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC