How to debug Java Stored Procedures in Oracle

我是研究僧i 提交于 2019-12-06 04:00:54

I think you'll want to use JDeveloper which you can also use to debug the app server. It's not as good an IDE as, well, almost any other IDE, but it works well enough for debugging tasks.

The Oracle JDeveloper has support for debugging java stored procedures. You will need to compile the java classes using the -g option so that the debugging information is generated in teh class files, i.e.

javac $JAVA_OPTS -g file_names

After that, you will need to write a dummy pl/sql package-procedure that invokes this java stored procedure. Then right click on the pl/sql procedure name and select 'Debug'.

After that you can step through the pl/sql and java code just as if you were debugging a regular java class. Since you compiled the java class using the -g option, you can watch variables, evaluate expressions etc. If you didn't use the -g option, you will still be able to step through the code in the debugger, but you will not be able to watch the variables/expressions.

Another option is to use the Java Logging framework.

You can then copy logging.properties, with your specified Handler into the folder ORACLE_HOME/javavm/lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!