Wednesday, August 17, 2011

Enabling Oracle JDBC Driver Debug capabilities

Troubleshooting problems with the webMethods JDBC Adapter in combination with the Oracle Thin Driver (ojdbc) can be cumbersome process. Needless to say that a specific issue might be caused by another problem such as intermittent network latency, packet loss etc.

A help in times of trouble is the fact that Oracle has a “debug” version of the JDBC Driver providing an interesting source of debugging information. This blog post will provide more information on how activate the “debug” version of the Oracle JDBC Driver within the webMethods IntegrationServer version 7.1.2 :

1. Download following files from the Oracle website :
  • “_g” version of the appropriate JDBC Driver (for example ojdbc5_g.jar)
  • demo.zip which contains a sample of the “OracleLog.properties” file


2. Store the debug library within your webMethods IntegrationServer’s home directory <IS_HOME>/lib/jars/. Make sure to temporary back out the non debug version of the Oracle JDBC Driver

3. Update and configure “OracleLog.properties” file as per your desired logging level.

3. For ease of use store “OracleLog.properties” file in the same location as the debug library file.

4. Activate the debug library by adding 2 Java System Property parameters to your webMethods IntegrationServer’s JVM start-up arguments :
  • -Doracle.jdbc.Trace=true
  • -Djava.util.logging.config.file=/<location>/OracleLog.properties
The first –D parameter will activate the JDBC debug trace whereas the second one is used to specify the location of your choice of the debug library property file

5. Shutdown and restart your webMethods IntegrationServer instance.


Author: Johan

2 comments:

  1. Johan -

    I am trying to enable driver debug logging in webMethods 7.1.3. I have followed steps similar to what you have mentioned above with no luck.

    1) Downloaded Oracle debug JDBC driver 11gR2 from oracle.com and placed it under ' IntegrationServer/lib/jars'
    2) Created an oracle logging config properties file - downloaded from oracle.com
    3) Added following system properties to the java startup line in server.bat ...
    -D oracle.jdbc.Trace=true
    -D "oracle.jdbc.LogFile=%IS_DIR%\jdbcAdapter.log"
    -D "java.util.logging.config.file=%IS_DIR%\OracleLog.properties"

    This hasn't produced any kind of debugging output. Where did you see your debug logging? Appreciate your help.

    ReplyDelete
    Replies
    1. Hi Sandeep,

      First of all thank you for your feedback.

      My personal setup was on HPUX but following pointers might help you further:
      1. didn't set option oracle.jdbc.LogFile
      2. updated log levels in file OracleLog.properties for all to FINEST as a start. It can be further tweaked as per your own need afterwards.
      3. on my end STDOUT type of data (e.g. console) is being redirected to a seperate file. ojdbc trace information is being showing up in this dedicated file.

      Good luck!

      Johan

      Delete