From: thomas at tada.se (Thomas Hallgren) Date: Tue, 21 Feb 2006 16:03:48 +0100 Subject: [Pljava-dev] Java calling other jars In-Reply-To: <44D9FC40FD695B4E85F1C59965C27E0FAA4D56@man3> References: <44D9FC40FD695B4E85F1C59965C27E0FAA4D56@man3> Message-ID: <43FB2BD4.3050002@tada.se> 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 >