aspose file tools*
The moose likes JDBC and the fly likes How to output from a java program called from PL/SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to output from a java program called from PL/SQL" Watch "How to output from a java program called from PL/SQL" New topic
Author

How to output from a java program called from PL/SQL

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 579
I am getting this error
ORA-06502: PL/SQL: numeric or value error trying to return a java string>

from this code

p = rt.exec("echo "+envar);

BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
while ((len = bis.read(buffer, 0, bufSize)) != -1)
{
System.out.write(buffer, 0, len);
}
path = new String(buffer);
//p.waitFor();
return path;

Is there a way to get it to output the code or do I have to open a file within my program and write to it for debug purposes.

Thanks for any help

Tony
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30758
    
156

Tony,
Are you trying to ouput the oracle error code or your source code?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1134

Tony,
Visit the JVM forum where I answered this very same question that you also posted over there.

Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to output from a java program called from PL/SQL