agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] Java calling other jars
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Java calling other jars
@ 2006-02-21 14:50  
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2006-02-21 14:50 UTC (permalink / raw)

I fully understand the Postgres trusted language issue, but how can a
"sqlj.install_jar"'d jar file of mine call another jar? I'm trying to
use the Apache log4j but keep getting the error:

ERROR:  java.lang.SecurityException: read on
/usr/java/logging-log4j-1.2.13/dist/lib/log4j-1.2.13.jar

The log4j jar is world-readable and in a world-readable folder.

I have tried:

select sqlj.replace_jar('file:///home/timc/java.postgres.vote/vote.jar',
  'vote', false);
select
sqlj.install_jar('file:///usr/java/logging-log4j-1.2.13/dist/lib/log4j-1
.2.13.jar',
  'logging', false);
SELECT sqlj.set_classpath('voting', 'vote:logging');

But that makes no difference since I'm not calling any functions in the
log4j jar directly from Postgres.

Help!

TIA
Tim Clarke




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

* [Pljava-dev] Java calling other jars
@ 2006-02-21 15:03  
  parent: 
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2006-02-21 15:03 UTC (permalink / raw)

Hi Tim,
It seems you have either a CLASSPATH environment variable or the 
postgresql.conf variable 'pljava.classpath' setup so that the System 
Classloader makes attempts to read the log4j-1.2.13.jar file. Please 
make sure that:

a). No CLASSPATH environment variable is visible to the PostgreSQL backend.
b). the pljava.classpath *only* contains the full path to pljava.jar.

Kind regards,
Thomas Hallgren

Tim Clarke wrote:
> I fully understand the Postgres trusted language issue, but how can a
> "sqlj.install_jar"'d jar file of mine call another jar? I'm trying to
> use the Apache log4j but keep getting the error:
>
> ERROR:  java.lang.SecurityException: read on
> /usr/java/logging-log4j-1.2.13/dist/lib/log4j-1.2.13.jar
>
> The log4j jar is world-readable and in a world-readable folder.
>
> I have tried:
>
> select sqlj.replace_jar('file:///home/timc/java.postgres.vote/vote.jar',
>   'vote', false);
> select
> sqlj.install_jar('file:///usr/java/logging-log4j-1.2.13/dist/lib/log4j-1
> .2.13.jar',
>   'logging', false);
> SELECT sqlj.set_classpath('voting', 'vote:logging');
>
> But that makes no difference since I'm not calling any functions in the
> log4j jar directly from Postgres.
>
> Help!
>
> TIA
> Tim Clarke
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>   





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

* [Pljava-dev] Java calling other jars
@ 2006-02-21 15:57  
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2006-02-21 15:57 UTC (permalink / raw)

So those two get called first and my earlier attempts clouded the issue.
Thanks for helping - glad it was a simple one ;-)

Tim Clarke

> -----Original Message-----
> From: Thomas Hallgren [mailto:thomas at tada.se] 
> Sent: 21 February 2006 15:04
> To: Tim Clarke
> Cc: pljava-dev at gborg.postgresql.org
> Subject: Re: [Pljava-dev] Java calling other jars
> 
> 
> Hi Tim,
> It seems you have either a CLASSPATH environment variable or the 
> postgresql.conf variable 'pljava.classpath' setup so that the System 
> Classloader makes attempts to read the log4j-1.2.13.jar file. Please 
> make sure that:
> 
> a). No CLASSPATH environment variable is visible to the 
> PostgreSQL backend.
> b). the pljava.classpath *only* contains the full path to pljava.jar.
> 
> Kind regards,
> Thomas Hallgren




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


end of thread, other threads:[~2006-02-21 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21 14:50 [Pljava-dev] Java calling other jars 
2006-02-21 15:03 ` 
2006-02-21 15:57 [Pljava-dev] Java calling other jars 

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