This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tony Evans
Ranch Hand
Posts: 597
1
  • 0
  • 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: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic