Java Permission error using DBMS_XMLQuery.setXSLT( ) feature of XSU for PL/SQL

From: Mr T <wilson.to_at_umusic.com>
Date: 1 Aug 2002 02:23:12 -0700
Message-ID: <90aabc52.0208010123.38a31fce_at_posting.google.com>


Hi,

I'm having problems trying to apply a XSLT stylesheet using DBMS_XMLQuery.setXSLT( ) within XSU for PL/SQL. I'm runing Oracle 9.2.0.1.0 on Unix. I have a very basic example (see below) that tries to change the name of the TAGS generated by DBMS_XMLQuery.getXML using a very simple transformation. The error refers to a Java Permission problem:

ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission <?xml version="1.0"?> ... read) has not been granted to WSS.
The PL/SQL to grant this is dbms_java.grant_permission 'WSS', 'SYS:java.io.FilePermission', '<?xml version="1.0"?> .., 'read').

Has anyone had problems with this? If not, any simple working examples?

Here's the code:


declare

    queryCtx DBMS_XMLquery.ctxType;
    result CLOB;
    xsltTagConv VARCHAR2(32767);
begin

	<xsl:template match="ROWSET">
	  <WIZARDS>
	    <xsl:apply-templates/>
	  </WIZARDS>
	</xsl:template>

</xsl:stylesheet>';
  • set up the query context queryCtx := DBMS_XMLQuery.newContext('select * employee where emp_id = 1');
  • register the stylesheet to be applied DBMS_XMLQuery.setXSLT(queryCtx, xsltTagConv);
  • get the result result := DBMS_XMLQuery.getXML(queryCtx);

    DBMS_XMLQuery.closeContext(queryCtx); -- you must close the query handle.

end;


Any help would be appreciated.

Wilson Received on Thu Aug 01 2002 - 11:23:12 CEST

Original text of this message