• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony,
Are you trying to ouput the oracle error code or your source code?
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony,
Visit the JVM forum where I answered this very same question that you also posted over there.

Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic