[请教] 如何将P6spy,sqlprofiler 结合到Spring+Hibernate中

applicationContext.xml
      
      
 
 
 
 

  
      

 

spy.properties
module.log=com.p6spy.engine.logging.P6LogFactory
realdriver=oracle.jdbc.driver.OracleDriver
deregisterdrivers=true
filter=false
autoflush=true
excludecategories=info,debug,result,batch
reloadproperties=false
reloadpropertiesinterval=60
useprefix=false
appender=com.p6spy.engine.logging.appender.Log4jLogger
logfile=../logs/x-spy.log
append=true
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost
log4j.appender.SQLPROFILER_CLIENT.Port=4445
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true
log4j.logger.p6spy=DEBUG, SQLPROFILER_CLIENT

 
   

WEB-INF/lib
p6spy.jar
sqlprofiler.jar

启动错误
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@x.x.x.x:x
 at java.sql.DriverManager.getConnection(Unknown Source)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:281)
 at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:269)
 at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:253)
......

你可能感兴趣的:([请教] 如何将P6spy,sqlprofiler 结合到Spring+Hibernate中)