[Pljava-dev] java.lang.SecurityException

From: jluo at teltronics(dot)com (Joves Luo)
To:
Subject: [Pljava-dev] java.lang.SecurityException
Date: 2005-03-28 16:42:28
Message-ID: 11C803742910E84E9CDBFD344773B814759F77@srqech02.teltronics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Someone please help me, this is driving me crazy.

I wrote a java program that accesses a database and turns the data into
an xml string. I then use php to write that string to an .xml file.
Originally I was developing the program on a windows 2k server using
Apache 2, php5, and postgresql 8 with pljava.

My boss wanted me to move the server onto a Linux 7.3 box. So now the
entire thing is sitting on a Linux 7.3 server with Apache 1.3, php4, and
postgresql 8 with pljava.

Everything works except for the java application. I run:

select getxmlstring();

and I get:

ERROR: java.lang.SecurityException: read on
/var/lib/pgsql/pljava/PGtoXML.jar

Here is the stack trace from the log file:

java.lang.SecurityException: read on /var/lib/pgsql/pljava/PGtoXML.jar

at
org.postgresql.pljava.internal.Backend$2.assertPermission(Backend.java:1
84)

at
org.postgresql.pljava.internal.Backend$PLJavaSecurityManager.nonRecursiv
eCheck(Backend.java:125)

at
org.postgresql.pljava.internal.Backend$PLJavaSecurityManager.checkPermis
sion(Backend.java:103)

at java.net.URLClassLoader$5.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.getPermissions(Unknown Source)

at sun.misc.Launcher$AppClassLoader.getPermissions(Unknown
Source)

at java.security.SecureClassLoader.getProtectionDomain(Unknown
Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

ERROR: java.lang.SecurityException: read on
/var/lib/pgsql/pljava/PGtoXML.jar

I tried looking at the source code of pljava.internal.Backend, but there
are 3 places where the exception can be thrown. Can someone please help
me out?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20050328/7609db98/attachment.html>

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2005-03-28 16:50:24 [Pljava-dev] java.lang.SecurityException
Previous Message Thomas Hallgren 2005-03-28 13:35:21 [Pljava-dev] Re: Examples are always welcome !!!