From: jluo at teltronics.com (Joves Luo) Date: Mon, 28 Mar 2005 17:01:16 -0500 Subject: [Pljava-dev] java.lang.SecurityException Message-ID: <11C803742910E84E9CDBFD344773B814759F9C@srqech02.teltronics.com> Thomas Hallgren wrote: > >Only one method needs to be rewritten AFAICS, and that's the >constructor. Try this: > >public OWDBConnection() throws SQLException{ > db = DriverManager.getConnection("jdbc:default:connection"); >} > >That should do it. You will still use JDBC (that's just the interfaces) >but now you'll use the PL/Java jdbc implementation. The connection used >by PL/Java is implicit since it reflects the session of the caller of >the function, hence there's need to "login". > >If you got your code working on a windows system you probably have an >older version of PL/Java then yor setup must be slightly different >there. PL/Java somehow finds the jar file of the client driver. Perhaps >you had that jar file in your classpath in combination with a sligthly >older version of PL/Java where security was not as tight as it is now? >Eihter that, or you loaded the actual PostgreSQL client driver .jar file >into the database using sqlj.install_jar. As I explained earlier, such a >setup might seem to work although what really happens is that your >function will behave like a client for yet another backend. I have a >hard time thinking of a case when that would be desirable. > >Regards, >Thomas Hallgren > Thank you once again. I have one (hopefully last) problem. LOG: Exception LOG: in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/dom/DocumentImpl at PGtoXML.OWDBtoXML.(OWDBtoXML.java:19) at PGtoXML.PGtoXML.getXmlString(PGtoXML.java:7) ERROR: java.lang.NoClassDefFoundError: org/apache/xerces/dom/DocumentImpl I have installed the xerces xml parser the same way I installed the PGtoXML jar file. Is there something else I need to do in order to have PGtoXML see xerces? How do I set the classpath to be seen? I've already entered: SELECT sqlj.set_classpath('public', 'xercesImpl'); SELECT sqlj.set_classpath('public', 'xml_apis'); SELECT sqlj.set_classpath('public', 'PGtoXML'); Also, you were right; I was running pljava 1.0.0 on the windows box. I have replaced it with the latest version, and now both servers are broken. But I am sure that once I get this to work it'll be better than what I used to have. Once again thank you for you help. -------------- next part -------------- An HTML attachment was scrubbed... URL: