[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 22:40:25
Message-ID: B5A1DBBB-ADCF-4DE7-9F71-29E6550CA6A1@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Hal Hildebrand 2011-12-26 23:28:58 [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC
Previous Message Johann 'Myrkraverk' Oskarsson 2011-12-19 14:15:40 [Pljava-dev] pljava for pg7.4