?
Solved

how do i fix this error?

Posted on 2003-03-27
2
Medium Priority
?
888 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

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…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

762 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