[Pljava-dev] java.lang.SecurityException

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] java.lang.SecurityException
Date: 2005-03-28 18:15:55
Message-ID: 424849DB.4000901@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Joves Luo 2005-03-28 19:02:23 [Pljava-dev] java.lang.SecurityException
Previous Message Joves Luo 2005-03-28 17:02:32 [Pljava-dev] java.lang.SecurityException