Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how do i fix this error?

Posted on 2003-03-27
2
Medium Priority
?
911 Views
Last Modified: 2010-05-18
i'm using the below java code in an orcle 8.l.7 database to transform a xml file with a xsl file and output the transformed xml file. the code compiles fine in the database and it does the transformation  fine on my local machine using just java. when i try to run this in the oracle database i get the error:

ERROR at line 1:
ORA-29532: Java call terminate by uncaught Java exception:
javax.xml.transform.TransformerConfigurationException: XSL-1000: (Fatal Error)
Error while parsing XSL file (the Permission (java.io.FilePermission
/home/ehsitdev/EIMS/xsl/100004350a.xsl read) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(EMS_PROCS|PolicyTableProxy(EMS_PROCS))).
ORA-06512: at "EMS_PROCS.TRANSFORM_COMMAND_PROC", line 0
ORA-06512: at line 1

i am unable to find any documentation on this. does anyone know what permission i need? how do i fix this? thanks.

ben


CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED TRANSFORMXML AS
import java.io.*;
import java.lang.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;

/**
 * A simple demo of JAXP 1.1
 */
public class TransformXml {

    /**
     * Accept three command line arguments: the name of an XML
     * file, the name of an XSLT stylesheet, and the output file.
     * The result of the transformation is written to the output file.
     */

    public static void TransformFile (String p_xmlfile, String p_xslfile, String p_outputfile)
         throws javax.xml.transform.TransformerException {
     
     File xmlFile = new File(p_xmlfile);
     File xsltFile = new File(p_xslfile);
     File outputFile = new File (p_outputfile);

     javax.xml.transform.Source xmlSource =
       new javax.xml.transform.stream.StreamSource(xmlFile);
     javax.xml.transform.Source xsltSource =
       new javax.xml.transform.stream.StreamSource(xsltFile);
     javax.xml.transform.Result result =
       new javax.xml.transform.stream.StreamResult(outputFile);

     // create an instance of TransformerFactory
     javax.xml.transform.TransformerFactory transFact =
       javax.xml.transform.TransformerFactory.newInstance();

     javax.xml.transform.Transformer trans =
        transFact.newTransformer(xsltSource);

     trans.transform(xmlSource, result);

 }
}
/
0
Comment
Question by:benpung
2 Comments
 
LVL 1

Author Comment

by:benpung
ID: 8218454
i've been playing with the java permissions, and i think i have the original problem solved, but now i'm getting the error:

*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.SecurityException: relative pathnames are not
allowed(file:///home/ehsitdev/EIMS/xml/output.xml)
ORA-06512: at "EMS_PROCS.TRANSFORM_COMMAND_PROC", line 0
ORA-06512: at line 1

how is /home/ehsitdev/EIMS/xml/output.xml a relative pathname? it's the longest name i know? any thoughts?
0
 
LVL 1

Accepted Solution

by:
indypung earned 80 total points
ID: 8256134
you are initializing the the outputfile wrong.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question