agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] java.lang.SecurityException
Date: Mon, 28 Mar 2005 20:15:55 +0200
Message-ID: <424849DB.4000901@mailblocks.com> (raw)
In-Reply-To: <11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.com>
References: <11C803742910E84E9CDBFD344773B814759F78@srqech02.teltronics.com>
Joves Luo wrote:
>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;
>
> --------------------------------------------------------------------------------
>
Ok, that looks good. Still, according to your stacktrace, an attempt is
made to load the PGtoXML.jar using the system classloader which in turn
tells me that either your CLASSPATH environment variable or the
pljava.classpath in the postgresql.conf contains this jar. You should
remove that setting.
Regards,
Thomas Hallgren
view thread (35+ messages) latest in thread
Message-ID: <424849DB.4000901@mailblocks.com>
Permalink: ../424849DB.4000901@mailblocks.com/
Also on: postgresql.org/message-id/424849DB.4000901@mailblocks.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: <424849DB.4000901@mailblocks.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