PL/SQL (MOSC)

MOSC Banner

ORA-29532 when executing java source stored procedure

edited Jan 11, 2023 9:17AM in PL/SQL (MOSC) 2 commentsAnswered

Hello,

we are using Oracle 12.1.0.2.0 database on Windows 2016 64 bit. We have following java source:

CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED Command 

AS

import java.io.*;

import java.util.*;

public class Command{

public static void run(String cmdText) 

           throws IOException, InterruptedException

{

 int rtn;

    Runtime rt = Runtime.getRuntime();

 Process prcs = rt.exec(cmdText);

 rtn = prcs.waitFor();

}

};

and following stored procedure:

CREATE OR REPLACE PROCEDURE runoscommand(cmd IN VARCHAR2)

AS LANGUAGE JAVA

NAME 'Command.run(java.lang.String)';

/


Occasionally the following error happens when executing "runoscommand":

ORA-29532: Java call terminated by uncaught Java exception: java.io.IOException: Cannot run program....

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center