From: janardhan.prabhakara at emc.com (janardhan.prabhakara at emc.com) Date: Fri, 24 Jun 2011 17:10:01 -0400 Subject: [Pljava-dev] Failed to create Java VM, WinXP In-Reply-To: References: Message-ID: I faced a similar issue with PostgreSQL 8.1 - on WindowsXP... The root cause of this is that : pljava.dll has a dependency on libpq.dll - which is going to be present in $INSTALLATION_PATH/lib... I was able to get around this problem by updating the System PATH variable ("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment") - this is the path variable setting when sets up the PATH variable system wide by : My Computer -> Advanced -> Environment Variables - to include $INSTALLATION_PATH/lib This is required because Postgres runs as service on windows... On *nix systems, I achieved the same by using ldconfig and crle on Solaris, such that pljava.dll/pljava.so can dynamically load libpq.dll/libpg.so. Of course, on *nix system LD_LIBRARY_PATH would also work - but that would have to be setup in a script that starts Postgres. Using ldconfig of course makes libpq.so visible for dynamic loading system wide. Hope this helps. -Janardhan -----Original Message----- From: pljava-dev-bounces at pgfoundry.org [mailto:pljava-dev-bounces at pgfoundry.org] On Behalf Of david.sahagian at emc.com Sent: Friday, June 24, 2011 2:50 PM To: pljava-dev at pgfoundry.org Subject: [Pljava-dev] Failed to create Java VM, WinXP I am trying to get pljava set up on my Windows XP machine. () I am running "PostgreSQL 9.0beta4, compiled by Visual C++ build 1500, 32-bit" () I downloaded: pljava-i686-pc-mingw32-pg9.0-1.4.2.tar.gz () I made these changes to postgresql.conf . . . custom_variable_classes = 'pljava' pljava.classpath = 'C:\\Program Files\\PostgreSQL\\9.0\\lib\\pljava.jar' () I replaced the files "pljava.dll" and "pljava.jar", which were in C:\Program Files\PostgreSQL\9.0\lib, with the files in the pljava download. () I added the following entries to the PATH var: set PATH=%PATH%;C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jre6\bin\client () I restarted my laptop. () I applied "install.sql" to the db, using psql. and saw: CREATE SCHEMA GRANT CREATE FUNCTION CREATE LANGUAGE . . . CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION () I did CREATE or Replace FUNCTION getsysprop(VARCHAR) RETURNS VARCHAR AS 'java.lang.System.getProperty' LANGUAGE java; This worked, it created the function in the "public" schema. () But when I ran this: SELECT getsysprop('user.home'); I got: ERROR: Failed to create Java VM Can somebody help me troubleshoot my failed attempt at installing ? Thanks. _______________________________________________ Pljava-dev mailing list Pljava-dev at pgfoundry.org http://pgfoundry.org/mailman/listinfo/pljava-dev