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

From: hoyt_chen <member30800_at_dbforums.com>
Date: Thu, 05 Jun 2003 17:48:15 +0000
Message-ID: <2964158.1054835295_at_dbforums.com>


Mr T

I got the similar problem now.

My server is Oracle 81700 on Win2000.
 Here is my code:



declare
queryCtx DBMS_XMLquery.ctxType;
result CLOB;
xsl varchar2(4000);
begin
-- set up the query context...!

queryCtx := DBMS_XMLQuery.newContext('select First_name,last_name from ad_employees where rownum < 6');

--Apply xsl shhey to the XML generation...!
xsl:=
'<!-- Emp.xsl: Transform ROWSET/ROW format to Employees.dtd vocabulary -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">   <xsl:template match="/">

     <xsl:for-each select="ROWSET">
        <Employee_List>
            <xsl:for-each select="ROW">
                <Name>
                  <FName><xsl:value-of select="FIRST_NAME"/></FName>
                  <LName><xsl:value-of select="LAST_NAME"/></LName>
                </Name>
            </xsl:for-each>
        </Employee_List>
      </xsl:for-each>

  </xsl:template>
</xsl:stylesheet>
';
DBMS_XMLQuery.setXSLT(queryCtx,xsl);
  • get the result..! result := DBMS_XMLQuery.getXML(queryCtx);
  • Now you can use the result to put it in tables/send as messages.. printClobOut(result); DBMS_XMLQuery.closeContext(queryCtx); -- you must close the query handle.. end;
    Then I got an error:

ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: relative pathnames are not allowed(<!-- Emp.xsl: Transform ROWSET\ROW format to Employees.dtd vocabulary --> <xsl:stylesheet version="1.0"
xmlns:xsl="http:\www.w3.org\1999\XSL\Transform">   <xsl:template match="\">

     <xsl:for-each select="ROWSET">
        <Employee_List>
            <xsl:for-each select="ROW">
                <Name>
                  <FName><xsl:value-of select="FIRST_NAME"\><\FName>
                  <LName><xsl:value-of select="LAST_NAME"\><\LName>
                <\Name>
            <\xsl:for-each>
        <\Employee_List>
      <\xsl:for-each>

  <\xsl:template>
<\xsl:stylesheet>
)

When I changed the definition of xsl to CLOB as your said, I got an datatype error:

ORA-06550: line 11, column 1:
PLS-00382: expression is of wrong type
ORA-06550: line 10, column 1:


How did you solved this problem?

Thanks,

--

Posted via http://dbforums.com Received on Thu Jun 05 2003 - 19:48:15 CEST

Original text of this message