Lists: | PostgreSQL : PostgreSQL 메일 링리스트 : 2011-12-26 이후 배트맨 토토 22:40 |
---|
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 |
Lists: | PostgreSQL : PostgreSQL 메일 링리스트 : 2011-12-26 이후 배트맨 토토 22:40 |
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
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 |
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
From: | johann at 2ndquadrant(dot)com (Johann 'Myrkraverk' Oskarsson) |
---|---|
To: | |
Subject: | [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC |
Date: | 2012-01-04 00:45:45 |
Message-ID: | x6boqkxpl2.fsf@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hal Hildebrand <hal.hildebrand at gmail.com> writes:
> 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...
Thanks for the notice. All I can say is that I'll take a look
sometime in the not too distant future.
Can you tell us a little bit more about your system? OS type/version,
Java implementation (Oracle? OpenJDK? ...) and version? Postgres
version?
--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/
From: | hal(dot)hildebrand at gmail(dot)com (Hal Hildebrand) |
---|---|
To: | |
Subject: | [Pljava-dev] java.lang.SecurityException: read on /usr/share/javazi/UTC |
Date: | 2012-01-06 05:41:55 |
Message-ID: | AB3EE307-008D-48D0-8004-4F9689127A2A@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Sure. I'm running on Ubuntu 11.10, using PostgreSql 9.1x, PL/Java 1.4.3, Java open JDK 6b23~pre11-0ubuntu1.11.10.
Understand that I'm "outside the band" with 1.6, but this particular failure is the only problem I've had with 1.6. Considering it's nature, it's pretty clear it's just a permission issue, but I'm not entirely sure why it would be failing, given that this particular piece o' base JRE should pretty much have god rights and know wtf default directories its gonna read. So that's curious to me... Very curious.
On Jan 3, 2012, at 4:45 PM, Johann 'Myrkraverk' Oskarsson wrote:
>
> Thanks for the notice. All I can say is that I'll take a look
> sometime in the not too distant future.
>
> Can you tell us a little bit more about your system? OS type/version,
> Java implementation (Oracle? OpenJDK? ...) and version? Postgres
> version?