agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] java.lang.SecurityException
Date: Mon, 28 Mar 2005 12:02:32 -0500
Message-ID: <11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.com> (raw)

Thomas Hallgren wrote:
 
> 
>You try to load the PGtoXML.jar using the system classloader instead of

>installing it in the database with sqlj.install_jar, or in other words,

>you add the PGtoXML.jar to the PL/Java classpath. This in turn, causes 
>an illegal file access. PL/Java installs "java" as a trusted language. 
>Trusted languages have no access to the file system. Try installing 
>removing PGtoXML.jar from the classpath and instead install it into the

>database using install_jar.
> 
> 
>Regards,
>Thomas Hallgren

> 

 

I'm not sure what you mean, but I did use sqlj.install_jar to install
the jar files.  Here is the sql script I run:

 

------------------------------------------------------------------------
--------

SELECT sqlj.install_jar('file:///var/lib/pgsql/pljava/xercesImpl.jar',
'xercesImpl',  false);

SELECT sqlj.install_jar('file:///var/lib/pgsql/pljava/xml_apis.jar',
'xml_apis',  false);

SELECT sqlj.install_jar('file:///var/lib/pgsql/pljava/JDBC.jar', 'JDBC',
false);

SELECT sqlj.install_jar('file:///var/lib/pgsql/pljava/PGtoXML.jar',
'PGtoXML',  false);

 

SELECT sqlj.set_classpath('public', 'xercesImpl');

SELECT sqlj.set_classpath('public', 'xml_apis');

SELECT sqlj.set_classpath('public', 'JDBC');

SELECT sqlj.set_classpath('public', 'PGtoXML');

 

------------------------------------------------------------------------
--------

CREATE or REPLACE FUNCTION getXmlString()

  RETURNS VARCHAR

  AS 'PGtoXML.PGtoXML.getXmlString()'

  LANGUAGE java;

------------------------------------------------------------------------
--------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20050328/9cefd6cf/attachment.html;



view thread (35+ messages)  latest in thread

Message-ID: <11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.com>
Permalink:  ../11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.com/
Also on:    postgresql.org/message-id/11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.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
  In-Reply-To: <11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.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