java - Error on Oracle : ORA-29541 -


i'm trying call bash script within oracle database through java script. test tried basic script :

#!/bin/bash echo "it works !" 

and java script use :

import java.lang.*; import java.io.*;  public class uam_tools{      public static string toto ()  throws ioexception {     string[] unixcommand = {"/home/oz380/toto.sh"};     string pwd;     process p = runtime.getruntime().exec(unixcommand);     bufferedreader input =             new bufferedreader             (new inputstreamreader(p.getinputstream()));     pwd = input.readline();     input.close();     return pwd;     } }; 

i granted permissions had granted , created function in database :

sql> create or replace function topi return varchar2   2  language java   3  name 'uam_tools.toto() return java.lang.string';   4  / 

but when call function :

select topi dual; 

or :

sql> set serveroutput on; sql> declare   2  g varchar2(50);   3  begin   4  g := uam.topi;   5  dbms_output.put_line(g);   6  end;   7  / 

it doesn't work , prints error :

ora-29541: class uam.uam_tools not resolved 

i don't understand problem can be. if thankful.


Comments