tag:blogger.com,1999:blog-7826191065335473649.post8640503487375090017..comments2024-03-21T08:35:19.445-07:00Comments on The DayneO blog: Simplest way to debug your Oracle Java Stored Proceduredayneohttp://www.blogger.com/profile/04380081381533944922noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-7826191065335473649.post-7368785732568485132014-10-02T04:00:39.994-07:002014-10-02T04:00:39.994-07:00Thank you sir.
Helped us pinpoint the exact error...Thank you sir.<br /><br />Helped us pinpoint the exact error when we had to change our pop email to use ssl.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7826191065335473649.post-70231437903724413012013-02-06T01:50:55.905-08:002013-02-06T01:50:55.905-08:00It is also worth noting that this approach will al...It is also worth noting that this approach will also output Java exception stacks with no need for additional coding. Here's an example of today's debug run of a Java Stored Procedure that was throwing an exception:<br /><br />npas@NPASP> set serveroutput on size 1000000<br />npas@NPASP> call dbms_java.set_output(1000000);<br /><br />Call completed.<br /><br />npas@NPASP> begin<br /> 2<br /> 3 NPA_CORRESPOND.GET_NEW_MESSAGES();<br /> 4 end;<br /> 5 /<br />delflag=1<br />Host=10.184.55.134; username=npasrec<br />Default store obtained...<br />javax.mail.AuthenticationFailedException: EOF on socket<br /> at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:104)<br /> at javax.mail.Service.connect(Service.java:234)<br /> at javax.mail.Service.connect(Service.java:135)<br /> at org.woodsta.db.javamail.pop.POP.retrieveMails(POP:91)<br />begin<br />*<br />ERROR at line 1:<br />ORA-29532: Java call terminated by uncaught Java exception:<br />javax.mail.AuthenticationFailedException: EOF on socket<br />ORA-06512: at "NPAS.MAIL_UTILITY", line 23<br />ORA-06512: at "NPAS.NPA_CORRESPOND", line 10<br />ORA-06512: at line 3dayneohttps://www.blogger.com/profile/04380081381533944922noreply@blogger.comtag:blogger.com,1999:blog-7826191065335473649.post-77229108920237528712012-12-05T08:13:09.531-08:002012-12-05T08:13:09.531-08:00Unfortunately I don't use SQLDeveloper as my I...Unfortunately I don't use SQLDeveloper as my IDE so I wouldn't really know why it does not give you output from the Java Stored Proc. But I can make an educated guess...<br /><br />The IDE most likely runs DBMS_OUTPUT.ENABLE automatically before running your stored proc. That's why your DBMS_OUTPUT.PUT* statements give you output to the DBMS_OUTPUT window.<br /><br />I am not sure how you are executing the Java Stored Procedure, but I would assume that the IDE does not execute the DBMS_JAVA.SET_OUTPUT before running the stored proc. <br /><br />You could ensure that the DBMS_JAVA.SET_OUTPUT is always set by using an AFTER LOGON trigger that sets it when you logon to the database. All subsequent executes will use the value.<br /><br />Let us know if this works...<br />dayneohttps://www.blogger.com/profile/04380081381533944922noreply@blogger.comtag:blogger.com,1999:blog-7826191065335473649.post-68220728102270033302012-11-28T17:16:29.035-08:002012-11-28T17:16:29.035-08:00I thought I'd ask this as I've been unable...I thought I'd ask this as I've been unable to find an answer on the web.<br /><br />I'm using SQLDeveloper 3.0.04. I've no problem getting this to work in an SQLPLUS command line environment, but in the GUI, nada. Additionally, using PL/SQL I get output to the Dbms_Output window. Just not from a compiled java function that works fine in other respects.<br /><br />Any thoughts? <br /><br /><br />Leon King. leon.king@humber.caLeon Kingnoreply@blogger.com