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:

1
#pe_dic.Url=jdbc:oracle:thin:@myoraclemachine:1521:PHDIC
2
pe_dic.Url=jdbc:log4jdbc:oracle:thin:@myoraclemachine:1521:PHDIC
3
#pe_dic.Driver=oracle.jdbc.driver.OracleDriver
4
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:

01
.........
02
11824 [main] INFO jdbc.audit - 1. Connection.isClosed() returned false
03
11824 [main] INFO jdbc.audit - 1. Statement.new Statement returned 
04
11824 [main] INFO jdbc.audit - 1. Connection.createStatement() returned net.sf.log4jdbc.StatementSpy@2e67cd84
05
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 
06
FROM SLG_DATABASE c, SLG_DATASTORE d WHERE c.DATASTORE_S=d.DATASTORE_S ORDER BY d.DATASTORE_NAME,c.DATABASE_NAME 
07
08
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 
09
FROM SLG_DATABASE c, SLG_DATASTORE d WHERE c.DATASTORE_S=d.DATASTORE_S ORDER BY d.DATASTORE_NAME,c.DATABASE_NAME 
10
 {executed in 9 msec}
11
11833 [main] INFO jdbc.resultset - 1. ResultSet.new ResultSet returned 
12
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
13
11833 [main] INFO jdbc.resultset - 1. ResultSet.next() returned true
14
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(1) returned AOI_SHAPEFILE
15
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(2) returned 1263
16
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(3) returned AOI_SHAPEFILE
17
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(4) returned shapefile
18
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(5) returned dummy
19
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(6) returned dummy
20
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(7) returned dummy
21
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(8) returned seq
22
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(9) returned null
23
11833 [main] INFO jdbc.resultset - 1. ResultSet.getString(10) returned N
24
11833 [main] INFO jdbc.resultset - 1. ResultSet.next() returned true
25
.............

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.
  • http://kendyaditya.blogspot.com/ Kendy A. Sumbogo

    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.

Subscribe to RSS Feed Follow me on Twitter!