From: filip.hrbek at plz.comstar.cz (Filip Hrbek) Date: Mon, 13 Nov 2006 08:52:05 +0100 Subject: [Pljava-dev] newbie sqlj.install_jar problem References: <455452ED.6020900@hotmail.com> <449f4cf70611100702t3fee08e8n625e53a917e85a85@mail.gmail.com><4554AE53.2070207@hotmail.com> <4554B2CA.1020506@tada.se> Message-ID: <002401c706f8$9e9ffe50$1e03a8c0@fhrbek> Hi all, just for information, we use CentOS 4 (it is very close to RedHat EL distribution), and we have no problems with running pljava (using standard Sun Java). The only path to java libraries is /lib/i386/server which contains the libjvm.so library. Are you sure that your postmaster can see the LD_LIBRARY_PATH? Try to check the way it is passed to the postmaster start. Regards Filip ----- Original Message ----- From: "Thomas Hallgren" To: "Alpha Malick" Cc: Sent: Friday, November 10, 2006 6:11 PM Subject: Re: [Pljava-dev] newbie sqlj.install_jar problem > Hi Alpha, > The deployer is a client program. Running it successfully doesn't mean > that the backend is able to find the JVM libraries so your problem might > still be configuration related. PL/Java *should* work with Java 1.4.2. > I've never tried CentOS though. What Java distro do you use? Is it the > standard Sun Java for Linux? > > Regards, > Thomas Hallgren > > > Alpha Malick wrote: >> Thanks a lot Mark! >> Actually, i did like you, using the #2 option as suggested by the wiki. >> After that i managed to run the deployer, and it generated the tables in >> my database, like i said earlier. >> The problem here is with command >> select sqlj.install_jar('file:///opt/app/sqlj.jar','sqlj',true); >> >> this is where the error happens! >> I am going to try with java 1.5.0_09 >> >> thanks >> Alpha >> Mark Mitchell a ?crit : >> >>> I am new to this as well, but it sounds like postmaster can't find the >>> JVM libraries... >>> >>> See this section of the wiki: >>> http://wiki.tada.se/wiki/display/pljava/Posix+Installation >>> >>> Of the two options presented for the part of that Posix+Installation >>> page: >>> >>> Ensure that the JRE shared libraries can be found by the Postmaster >>> backend. This can be done in different ways depending on platform. >>> Here are two suggestions (the i386 directory will of course be named >>> something suitable for your CPU architecture): >>> >>> 1. Setting the LD_LIBRARY_PATH environment will work on most >>> Linux/Unix platforms. A good place to do this is usually the file >>> /etc/sysconfig/pgsql/postgresql: >>> >>> export >>> LD_LIBRARY_PATH=$JRE_HOME/lib/i386:$JRE_HOME/lib/i386/client >>> >>> >>> Apparently, on some Linux platforms you will also need to append >>> >>> :$JRE_HOME/lib/i386/native_threads >>> >>> 2. Add a file named postgresql to the directory /etc/ld.so.conf.d >>> that looks like this: >>> >>> /lib/i386 >>> /lib/i386/client >>> >>> The must be expanded. Then use /sbin/ldconfig to make >>> this new setting effective. >>> >>> >>> I did the #2 option on my CentOS 4 machine and had success (though I >>> had Java 1.5.0_09)... >>> >>> Regards, >>> >>> -Mark >>> >>> >>> On 11/10/06, Alpha Malick wrote: >>> >>>> Hello everybody >>>> i new to this list, and pl/java too. >>>> >>>> my environnement : >>>> CentOS Linux 4.2, java 1.4.2_11, postgresql 8.1.4, pljava 1.3.0 >>>> >>>> after the deployment done with command : >>>> java -cp >>>> /opt/pgsql/pljava/deploy.jar:/opt/pgsql/jdbc/postgresql-8.1-310.jdbc3.jar >>>> org.postgresql.pljava.deploy.Deployer -install -user dbuser -database >>>> mydb >>>> >>>> i have new tables in my database mydb : >>>> - sqlj.classpath_entry >>>> - sqlj.jar_entry >>>> - sqlj.jar_repository >>>> - sqlj.typemap_entry >>>> - sqlj.jar_repository_pkey >>>> - sqlj.jar_repository_jarname_pkey >>>> - sqlj.jar_entry_pkey >>>> - sqlj.jar_entry_jarid_key >>>> - sqlj.classpath_entry_pkey >>>> - sqlj.typemap_entry_pkey >>>> - sqlj.jar_repository_jarid_seq >>>> - sqlj.jar_entry_entryid_seq >>>> - sqlj.typemap_entry_mapid_seq >>>> >>>> now i would like to run command under psql: >>>> >>>> select sqlj.install_jar('file:///opt/app/sqlj.jar','sqlj',true); >>>> >>>> but each time, there is a failure, with error like this : >>>> INFO: Error occurred during initialization of VM >>>> INFO: Unable to load native library >>>> INFO: : libverify.so: cannot open shared object file: No such file or >>>> directory >>>> INFO: >>>> server closed the connection unexpectedly >>>> This probably means the server terminated abnormally >>>> before or while processing the request. >>>> The connection to the server was lost. Attempting reset: Failed. >>>> >>>> Can someone help? >>>> Where can i set up to have more ERROR information? >>>> Thanks! >>>> >>>> P.S: sorry if question has been asked before, but i have not found any >>>> answer that works for me. >>>> >>>> _______________________________________________ >>>> Pljava-dev mailing list >>>> Pljava-dev at gborg.postgresql.org >>>> http://gborg.postgresql.org/mailman/listinfo/pljava-dev >>>> >>>> >> >> _______________________________________________ >> Pljava-dev mailing list >> Pljava-dev at gborg.postgresql.org >> http://gborg.postgresql.org/mailman/listinfo/pljava-dev >> > > _______________________________________________ > Pljava-dev mailing list > Pljava-dev at gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/pljava-dev