agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] question on reading files using PL/Java
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] question on reading files using PL/Java
@ 2011-08-29 02:27  
  0 siblings, 2 replies; 3+ messages in thread

From:  @ 2011-08-29 02:27 UTC (permalink / raw)

I am trying to read some xml files on that are posted on the server's hard drive using the jdom library from with in PL/Java. Everything works fine outside PL/Java. I can read the xml file and parse the document no problem. However, from within PL/Java I am getting a security exception when I attempt to open the file. I have checked all the permissions on the file and everything seems OK. By default, PL/Java not allowed to read files on the server's hard drive? If not, is there a way I can configure it to allow this? 


ERROR: java.lang.SecurityException: read on /home/tomkincaid/pgdevel/pljava/ubiq-aug-2011-aug3.xml 
tomkincaid=# \q 
[tomkincaid at localhost pljava]$ cp ubiq-aug-2011-aug3.xml /tmp/xmltest.xml 
[tomkincaid at localhost pljava]$ psql 
edb-psql (9.0.4.14) 
Type "help" for help. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20110829/44f8cf47/attachment.html;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] question on reading files using PL/Java
@ 2011-08-29 06:02  
  parent: 
  1 sibling, 0 replies; 3+ messages in thread

From:  @ 2011-08-29 06:02 UTC (permalink / raw)

An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20110829/a70f1f9b/attachment.html;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] question on reading files using PL/Java
@ 2011-08-29 06:21  
  parent: 
  1 sibling, 0 replies; 3+ messages in thread

From:  @ 2011-08-29 06:21 UTC (permalink / raw)

On 08/28/11 7:27 PM, tjkincaid at comcast.net wrote:
> ERROR:  java.lang.SecurityException: read on 
> /home/tomkincaid/pgdevel/pljava/ubiq-aug-2011-aug3.xml

d0es that file and all the directories above it have world-read 
attributes?    pljava will be running as the postgresql *server* user, 
probably 'postgres', not as your local user account, so will only be 
able to access files that 'postgres' can access.



-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-08-29 06:21 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 02:27 [Pljava-dev] question on reading files using PL/Java 
2011-08-29 06:02 ` 
2011-08-29 06:21 ` 

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