PowerHub JDBC Log

I’m supporting CDS in Oil Company based in the Netherland. CDS is a suite of application, one of the application is PowerHub.
If I face a problem, I’ve to debug the PowerHub. One of method is to use log4jdbc.

What I do is:
1. Download the log4jdbc4-1.2alpha2.jar, and put into $PE_HOME/jars
2. Download from SL4J the compress file: slf4j-1.5.8.tar.gz. Extract slf4j-api-1.5.8.jar and slf4j-simple-1.5.8.jar from the compress file, and put into $PE_HOME/jars
3. Modify $PE_HOME/conf/pe_dic.props, remark the old value and change the line:
#pe_dic.Url=jdbc:oracle:thin:@myoraclemachine:1521:PHDIC
pe_dic.Url=jdbc:log4jdbc:oracle:thin:@myoraclemachine:1521:PHDIC
#pe_dic.Driver=oracle.jdbc.driver.OracleDriver
pe_dic.Driver=net.sf.log4jdbc.DriverSpy

4. Restart the PowerHub

You’ll need to check your $PE_HOME/logs/pe_dic-server.log, to see the additional jdbc log messages.
Below is the snippet of the log file:
.........
11824 [main] INFO jdbc.audit - 1. Connection.isClosed() returned false
11824 [main] INFO jdbc.audit - 1. Statement.new Statement returned
11824 [main] INFO jdbc.audit - 1. Connection.createStatement() returned net.sf.log4jdbc.StatementSpy@2e67cd84
11824 [main] INFO jdbc.sqlonly - SELECT upper(d.DATASTORE_NAME),c.DATABASE_S,c.DATABASE_NAME,c.TYPE,c.DRIVER,c.URL,c.TWO_TASK,c.SEQ_NAME,c.CLASS_NAME,c.PRIVATE
FROM SLG_DATABASE c, SLG_DATASTORE d WHERE c.DATASTORE_S=d.DATASTORE_S ORDER BY d.DATASTORE_NAME,c.DATABASE_NAME

11833 [main] INFO jdbc.sqltiming - SELECT upper(d.DATASTORE_NAME),c.DATABASE_S,c.DATABASE_NAME,c.TYPE,c.DRIVER,c.URL,c.TWO_TASK,c.SEQ_NAME,c.CLASS_NAME,c.PRIVATE
FROM SLG_DATABASE c, SLG_DATASTORE d WHERE c.DATASTORE_S=d.DATASTORE_S ORDER BY d.DATASTORE_NAME,c.DATABASE_NAME
{executed in 9 msec}
11833 [main] INFO jdbc.resultset - 1. ResultSet.new ResultSet returned
11833 [main] INFO jdbc.audit - 1. Statement.executeQuery(SELECT upper(d.DATASTORE_NAME),c.DATABASE_S,c.DATABASE_NAME,c.TYPE,c.DRIVER,c.URL,c.TWO_TASK,c.SEQ_NAME,c.CLASS_NAME,c.PRIVATE FROM SLG_DATABASE c, SLG_DATASTORE d WHERE c.DATASTORE_S=d.DATASTORE_S ORDER BY d.DATASTORE_NAME,c.DATABASE_NAME) returned net.sf.log4jdbc.ResultSetSpy@20e5ace9
11833 [main] INFO jdbc.resultset - 1. ResultSet.next() returned true
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(1) returned AOI_SHAPEFILE
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(2) returned 1263
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(3) returned AOI_SHAPEFILE
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(4) returned shapefile
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(5) returned dummy
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(6) returned dummy
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(7) returned dummy
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(8) returned seq
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(9) returned null
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(10) returned N
11833 [main] INFO jdbc.resultset - 1. ResultSet.next() returned true
.............

From the log file, you can see that the PowerHub tries to read the dictionary to get the databases information…

You can leave a response, or trackback from your own site.
  • What does it do, actually? Any screenshoot?
  • hollyghozi
    Thank you Ken. I've now updated the post with the output of the PowerHub
    logs with extended jdbc information.
    Please let me know if this help you.
blog comments powered by Disqus
Subscribe to RSS Feed Follow me on Twitter!