agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes
@ 2011-09-12 17:42 
  2011-09-12 18:29 ` [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes 
  0 siblings, 1 reply; 2+ messages in thread

From:  @ 2011-09-12 17:42 UTC (permalink / raw)

Hi, could someone please help resolve this problem.

I?ve been writing a Pl/Java function, very similar to the one found here:
http://wiki.tada.se/index.php?title=Functions_returning_sets#Using_the_ResultSetProvider_interface

However, everything seems to work well, until I embed some XPath code
inside. Below is a small snippet:

import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;

... 

XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
XPathExpression expr = xpath.compile(schema.getPathExpr(att));
Node node = (Node) expr.evaluate(msg.document(), XPathConstants.NODE);

It seems that, all is fine when accessing standard ?java?, however, it seems
to break when I start using ?javax.*? files.

The exception I get is:

"java.lang.SecurityException: read on
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar?

Any help as to how I can resolve this would be appreciated!

--
View this message in context: http://postgresql.1045698.n5.nabble.com/java-lang-SecurityException-Can-t-read-standard-JDK-classes-...
Sent from the PL/Java mailing list archive at Nabble.com.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes
  2011-09-12 17:42 [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes 
@ 2011-09-12 18:29 ` 
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2011-09-12 18:29 UTC (permalink / raw)

Larry <l.paige at live.com> writes:

> Hi, could someone please help resolve this problem.

[...]
> The exception I get is: "java.lang.SecurityException: read on
> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
>
> Any help as to how I can resolve this would be appreciated!

My first guess is that you're doing something that's forbidden with
the PL/Java security manager.  Have you tried your function with
LANGUAGE JAVAU instead?

-- 
   Johann Oskarsson                http://www.2ndquadrant.com/    |[]
   PostgreSQL Development, 24x7 Support, Training and Services  --+--
                                                                  |
   Blog: http://my.opera.com/myrkraverk/blog/





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-09-12 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 17:42 [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes 
2011-09-12 18:29 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox