From: thomas at tada.se (Thomas Hallgren) Date: Fri, 25 Nov 2005 09:03:15 +0100 Subject: [Pljava-dev] Re: ERROR: java.lang.ClassNotFoundException: testPLjava In-Reply-To: <00c401c5f196$701f8730$b40b010a@secfindia.com> References: <00c401c5f196$701f8730$b40b010a@secfindia.com> Message-ID: <4386C543.1060401@tada.se> Param, Please post your questions to the pljava-dev at gborg.postgresql.org mailing-list. In what package did you create the class? PL/Java will require that you use a package. Regards, Thomas Hallgren param wrote: > Hi Thomas, > > > I solved this problem by point the libjvm.so to the correct JVM > (sparc/client). Now I have created a simple java class. > > public class testPLjava > { > public static void nunny() > { > System.out.println("Hello World!"); > } > } > > > created a jar file named "test.jar" > > > installed the jar using > > "select sqlj.install_jar('file:///usr/local/pgsql/pljava/','test',false);" > > then set the classpath > > "SELECT sqlj.set_classpath('node_control', 'test');" // Node control is > the schema name > > I created a function using > > "CREATE FUNCTION node_control.nunny() RETURNS void AS 'testPLjava.nunny()' > LANGUAGE java;" > > when the run the function using > > "select node_control.nunny();" > > It gives me following error: > > "ERROR: java.lang.ClassNotFoundException: testPLjava" > > > Please advice > > Thanks > -param > > -----Original Message----- > From: Thomas Hallgren [mailto:thomas at tada.se] > Sent: Wednesday, November 23, 2005 6:14 PM > To: param.kaur at secf.com > Cc: PL/Java Development > Subject: Solaris and -Xusealtsigs [Was: Re: Need help on Pljava] > > Hi Param, > I'm posting this on the pljava-dev mailing list also. PL/Java is an open > source community and questions are best answered in the open forum. It > benefits other people that might have similar problems, and since it > widens the audience, it also benefits you. > > I haven't seen this error before. Then again, I don't have access to a > Solaris system. The option mentioned (-Xusealtsigs) is not present on a > standard Java on Linux or Windows. What Java version are you using? > > You can try and add this option in the postgresql.conf file. > > pljava.vmoptions = '-Xusealtsigs' > > but I'm not at all sure that it will help. Another thing you could try > is to comment out line 632 in the file src/C/pljava/Backend.c and > recompile. A third option is to try and add the following line: > > pgsignal(SIGINT, SIG_DFL); > > before line 617 in the same file. I'm very keen to know what it was that > made the difference if you somehow succeed. > > This is the best I can do right now since I don't have access to Solaris > system. Perhaps someone else on this forum has shed some more light on this? > > Regards, > Thomas Hallgren > > param wrote: > >> Thomas, >> >> Thanks for your help. I really appreciate it. I have successfully >> > installed > >> pljava. Now as I try to execute the following query : >> >> CREATE FUNCTION getsysprop1(VARCHAR) >> RETURNS VARCHAR >> AS 'java.lang.System.getProperty' >> LANGUAGE java; >> SELECT getsysprop1('user.home'); >> >> It gives me following error: >> >> INFO: Error occurred during initialization of VM >> INFO: Signal chaining not allowed for VM interrupt signal, >> try -Xusealtsigs. >> 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: Succeeded. >> >> Please advice. >> I really appreciate it. >> >> Thanks >> -param >> >> >> > > > > >