agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] java.lang.SecurityException
Date: Mon, 28 Mar 2005 21:09:59 +0200
Message-ID: <42485687.4060103@mailblocks.com> (raw)
In-Reply-To: <11C803742910E84E9CDBFD344773B814759F81@srqech02.teltronics.com>
References: <11C803742910E84E9CDBFD344773B814759F81@srqech02.teltronics.com>

Joves Luo wrote:

>Thomas Hallgren wrote:
>
>  
>
>> 
>
>>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
>
>> 
>
>  
>
> Thank you, that seemed to do the trick on the securityexception.  But 
> now I am getting another exception:
>
>  
>
> ***Exception:
>
> java.lang.ClassNotFoundException: org.postgresql.Driver
>
Something in your code is asking explicitly for the 
org.postgresql.Driver. That driver is the client JDBC driver and should 
not be used within PL/Java. If it indeed was found, using it would 
result in a remote connection to another backend process that runs in a 
separate transaction, most likely in combination with a significant 
performance hit.

In order to obtain a connection in PL/Java, you must use:

Connection conn = DriverManager.getConnection("jdbc:default:connection");

The Driver in use here will be the org.postgresql.pljava.jdbc.SPIDriver 
but you shouldn't normally need to be concerned with choice of driver.

Regards,
Thomas Hallgren





view thread (35+ messages)  latest in thread

Message-ID: <42485687.4060103@mailblocks.com>
Permalink:  ../42485687.4060103@mailblocks.com/
Also on:    postgresql.org/message-id/42485687.4060103@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: <42485687.4060103@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