From: makska at yandex.ru (Maxim) Date: Wed, 16 Aug 2006 15:32:22 +0400 Subject: [Pljava-dev] Unable to load class org/postgresql/pljava/internal/Backend using CLASSPATH '-Djava.class.path=/usr/lib64/pgsql/pljava.jar' In-Reply-To: <44E2D125.7000107@tada.se> References: <44E2D125.7000107@tada.se> Message-ID: <5647.060816@yandex.ru> Hello Thomas, Yes! The problem is solved after recompiling Postgres with "--without-zlib" option. Thanks you a lot for advice!! Best wishes, Maxim Karavaev TH> Ahh, InternalError. I should have caught this earlier. The Sun JDK has a TH> bug specifically on the AMD64 that causes clashes in the zlib routines. TH> It's fixed in the coming 6.0 release and it's also no longer an issue in TH> the in the coming 8.2 version of PostgreSQL since the backend no longer TH> links with zlib. In fact, there's no reason for it to link with zlib in TH> 8.1 either. So a safe workaround is to: TH> 1. preserve your current pg_dump/pg_restore (the only two programs that use zlib) TH> 2. configure using --without-zlib and rebuild and rebuild + reinstall PostgreSQL TH> 3. restore pg_dump/pg_restore TH> Kind Regards, TH> Thomas Hallgren TH> Maxim wrote: >> Thomas, thanks for your help! >> >> I've changed log_min_message to debug1 and got the following trace: >> >> DEBUG: Not using integer_datetimes >> DEBUG: Added JVM option string "-Xmx64M" >> DEBUG: Added JVM option string >> "-Djava.class.path=/usr/lib64/pgsql/pljava.jar" >> DEBUG: Added JVM option string >> "-Dsqlj.defaultconnection=jdbc:default:connection" >> DEBUG: Added JVM option string "vfprintf" >> DEBUG: Added JVM option string "-Xrs" >> DEBUG: Creating JavaVM >> DEBUG: JavaVM created >> DEBUG: Getting Backend class pljava.jar >> WARNING: java.lang.InternalError >> DEBUG: Destroying JavaVM... >> DEBUG: JavaVM destroyed >> ERROR: Unable to load class org/postgresql/pljava/internal/Backend >> using CLASSPATH '-Djava.class.path=/usr/lib64/pgsql/pljava.jar' >> >> Best regards, >> Maxim Karavaev >>> Hmm, strange. Try setting the postgresql.conf variable >>> log_min_messages to debug1. Then make a new attempt. That might >>> produce some more trace in the backend log that might be helpful. >>> >>> Regards, >>> Thomas Hallgren >>> >>> Maxim wrote: >>>> Hi Thomas, >>>> >>>> Thanks you a lot for your answer! >>>> >>>> I've changed LD_LIBRARY_PATH to >>>> /usr/lib64:/usr/java/jdk1.5.0_06/jre/lib/amd64/server:/usr/java/jdk1.5.0_06/jre/lib/amd64 >>>> , >>>> dynamic_library_path in postgresql.conf to >>>> '$libdir:/usr/lib64/pgsql' and double checked read permissions and >>>> location of pljava.jar file. >>>> >>>> But error is still the same... >>>> >>>> All the best, >>>> Maxim Karavaev >>>>> Hi Maxim, >>>>> Your LD_LIBRARY_PATH seems a bit off. Normally you need the both >>>>> jre/lib/amd64/server and the parent directory jre/lib/amd64. The >>>>> dynamic_library_path is also incorrect. It should only appoint the >>>>> directory of the pljava.so file, (so '$libdir:/usr/lib64/pgsql' is >>>>> probably more accurate). >>>>> >>>>> The problem you encounter however, seems to be related to the >>>>> pljava.classpath setting in the postgresql.conf file. Double check >>>>> this setting and that the pljava.jar really is at that location. >>>>> Verify that the PostgreSQL backend process has read permissions on >>>>> the directory and the pljava.jar file. >>>>> >>>>> Regards, >>>>> Thomas Hallgren >>>>> >>>>> >>>>> Maxim wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> I've got troubles installing PlJava on FedoraCore4 x64. >>>>>> I have PostgreSQL 8.1.4, jre 1.5.0_06 and compiled from sources >>>>>> PlJava >>>>>> 1.3.0 (with the same jdk - 1.5.0_06). >>>>>> After deploying PlJava and running query like: >>>>>> >>>>>> CREATE FUNCTION sqlj.getsysprop(VARCHAR) >>>>>> RETURNS VARCHAR >>>>>> AS 'java.lang.System.getProperty' >>>>>> LANGUAGE java; >>>>>> >>>>>> SELECT sqlj.getsysprop('user.home'); >>>>>> >>>>>> I've got after fist time "Unable to load class >>>>>> org/postgresql/pljava/internal/Backend using CLASSPATH >>>>>> '-Djava.class.path=/usr/lib64/pgsql/pljava.jar'" error, >>>>>> after second - "Failed to create Java VM". >>>>>> >>>>>> I've been trying a lot of different settings of LD_LIBRARY_PATH, >>>>>> postgresql.conf, etc, but can't find solution. >>>>>> >>>>>> My latest settings are: >>>>>> >>>>>> postgresql.conf >>>>>> dynamic_library_path = >>>>>> '$libdir:/usr/lib64/:/usr/java/jdk1.5.0_06/jre/lib/amd64/server/:/usr/lib64/pgsql/' >>>>>> >>>>>> custom_variable_classes = 'pljava' >>>>>> pljava.classpath = '/usr/lib64/pgsql/pljava.jar' >>>>>> pljava.vmoptions = '-Xmx64M ' >>>>>> pljava.debug = false >>>>>> >>>>>> echo $LD_LIBRARY_PATH >>>>>> /usr/lib64/:/usr/java/jdk1.5.0_06/jre/lib/amd64/server/ >>>>>> >>>>>> >>>>>> I've been searching for the same error in google and in this mailing >>>>>> list, but can't find solution for me... :( >>>>>> >>>>>> Highly appreciate any help!! >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Pljava-dev mailing list >>>>> Pljava-dev at gborg.postgresql.org >>>>> http://gborg.postgresql.org/mailman/listinfo/pljava-dev >>>>> >>>>>