This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 573
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

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: 1121

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

Good Luck,
Avi.
 
Don't get me started about those stupid light bulbs.
 
subject: How to output from a java program called from PL/SQL
 
Similar Threads
Calling a java object fromn a store procedure no idea how to get it to work
reading byte array
Permission problem calling java from PL/SQL
Calling the UNIX API
A problem with servlet file transfer