Posts Tagged ‘p6spy’
Use p6spy with BEA WebLogic 9.2
Case:
You need debug information on SQL queries, for an application within BEA WebLogic 9.2. You need p6spy.
P6spy is a jar which play the role of a bridge between your application and your actual JDBC driver (in my case: oracle.jdbc.driver.OracleDriver
for Oracle 10g)
Solution:
- Change JDBC Driver in Weblogic Web Console
Services > JDBC > Data Sources >
(your data source)> Configuration > Connection Pool > Driver Classname = com.p6spy.engine.spy.P6SpyDriver
- Copy p6spy-1.3.jar and spy.properties in
%WL_HOME%/servers/lib/ext
- Check that spy.properties contains : realdriver=oracle.jdbc.driver.OracleDriver
- In the spy.properties choose the
stdoutLogger
, rather thanlog4jLogger
appender - In the
CLASSPATH
ofstartManagedWebLogic.cmd
, add the following path:%WL_HOME%/servers/lib/ext/p6spy-1.3.jar;%WL_HOME%/servers/lib/ext