calling java from Oracle 8i stored prcedure security problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

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

  1. #1
    John Harkin Guest

    calling java from Oracle 8i stored prcedure security problem


    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 );
    }
    }
    }

  2. #2
    igordein Guest

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


    Do you set permission for the file c:\\temp\\jh.tmp
    in the oracle configuration file?

    "John Harkin" <john.harkin@singularity.co.uk> wrote:
    >
    >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 );
    > }
    >}
    >}



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center