Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: calling java from Oracle 8i stored prcedure security problem

Re: calling java from Oracle 8i stored prcedure security problem

From: alex <alexbur_at_iname.com>
Date: Sat, 26 Aug 2000 01:08:14 +0300
Message-ID: <39A6EE4E.E77CC185@iname.com>

JAVASYSPRIV harkinj_at_my-deja.com wrote:

> Hi,
> I'm attempting to call a java method from an Oracle stored procedure.
> The stored procedure is as follows.
> CREATE OR REPLACE PROCEDURE CreateJob( JobId VARCHAR2 )
> AS language Java
> name 'AreasDML.insertrow( java.lang.String )';
> /
> I'm logged in as system/manager when i run the above in sql plus.
>
> When i run the stored proecdure i get
> ORA-29532: Java call terminated by uncaught Java exception:
> java.lang.SecurityException
>
> I only get this when the java code attempts to do something like write
> to a file or connect to a URL.
> If it does nothing then everthing is fine.
>
> What do i have to do to get it working correctly ?
>
> Java Source :
>
> import java.io.*;
>
> class AreasDML
> {
> public static void
> insertrow ( String JobId)
> {
> try
> {
>
> FileWriter fw = new FileWriter("c:\\temp\\jh.tmp");
> fw.write("Hello John");
> fw.close();
>
> catch ( IOException e)
> {
> System.out.println("Error:" + e );
> }
> }
> }
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Aug 25 2000 - 17:08:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US