Questions tagged [p6spy]

P6Spy is a framework that enables database activity to be seamlessly intercepted and logged with no code changes to the application.

P6Spy is a framework that enables database activity to be seamlessly intercepted and logged with no code changes to the application.

Resources:

65 questions
1
vote
2 answers

How to configure p6spy with datasource in Spring + tomcat 7 +MySQL

I have been trying to configure p3spy logging system on my maven based spring project.But each time when i try to configure p3spy differently. i get always errors. Here is my following settings I placed p6spy-2.3.0.jar, spy.properties and…
princeexpedition
  • 143
  • 1
  • 4
  • 15
1
vote
2 answers

How to print P6Spy log statements to the Tomcat console

I've integrated P6Spy into my Netbeans project, and the SQL log statements are being printed to the spy.log file in the Tomcat home directory. How do I get the SQLlog statements to be printed to my Tomcat console? Context: server is Tomcat…
the beest
  • 463
  • 6
  • 26
1
vote
2 answers

tool for detecting non-parametrized sql in java jdbc code

I'm looking to inspect SQL statements in Java/jdbc code to ensure that the SQL to be executed is of acceptable quality. Neither PMD not Findbugs appears to have JDBC or sql rules. I could use p6spy to log the SQL and look at that way, but this is…
sal
  • 23,373
  • 15
  • 66
  • 85
1
vote
3 answers

p6spy cannot find a suitable driver for com.mysql.jdbc.Driver

using tomcat 7, tomcat-jdbc.jar, p6spy 2.14, C3p0, and hibernate on ubuntu 14.04 OS. my p6spy.jar resides in /usr/share/tomcat7/lib which is in my cp. spy.properties file is being passed in via system property to tomcat properly. Relevant section…
steveinatorx
  • 705
  • 9
  • 22
1
vote
2 answers

Can't achieve working with p6Spy

I've tried two methods for adding p6Spy feature to my spring used project. Route I, http://templth.blogspot.com.tr/2004/11/integrate-p6spy-with-spring.html I changed my driver with com.p6spy.engine.spy.P6SpyDriver and added realdriver …
Davut Gürbüz
  • 5,526
  • 4
  • 47
  • 83
1
vote
0 answers

Logging SQL on error only

I am currently logging sql from hibernate using p6spy in order to get the full sql with the parameters in it so it can be copied and pasted easier for debugging. However I want to log only when the database has an error. Is there anyway to achieve…
eam1813
  • 143
  • 2
  • 8
1
vote
2 answers

Using p6spy in production

Does anyone use p6spy log in production environment? I would like to enable logging all statements for one table and include stacktrace as well. The table I am interested in contains only a couple (usually really only 2) rows which are read and…
L.R.
  • 977
  • 6
  • 22
1
vote
2 answers

Inspect JDBC select query for batch size

I have a database with >100K records and I want to get the results as batch. I am using SQL server and the fetchsize set is 50. How do I make sure that only 50 records are retrieved and then the next 50. I tried debugging the SQL using P6SPY and the…
Nik
  • 211
  • 4
  • 16
0
votes
4 answers

SQL logging in Websphere 6.1

I am looking for a tool that Logs SQL statemetns fired in the application as I use the application. I found p6spy. But there is an issue with that. It doesnt seem to be compatible with XA Datasources. Is there a way to make p6spy work on Websphere…
Sathya
  • 2,371
  • 5
  • 19
  • 27
0
votes
0 answers

p6spy binding variable mismatch

The library of p6spy is "con.github.gavlyukovskiy:p6spy-springpbootpstarter:1.9.0" And since I use JPA and QueryDSL, I wanted to check if the variable was properly bound, so I used p6spy. Here, using JPA's Multi-Tenancy method, every query contains…
0
votes
0 answers

Log SQL Query using p6spy and spring-boot 2.7

I am trying to log my SQL queries using p6spy. I am using spring-boot 2.7.9. I am using the spring-boot-data-source-decorator. I have added the dependency as mentioned in the README. NFO] | +- org.springframework:spring-tx:jar:5.3.25:compile [INFO]…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
0 answers

P6psy stopped working after upgrading to spring boot from 2.5.5 to 2.7.7

I have configured p6spy using the datasource way like "P6DataSource(new HikariDataSource(hikariConfig))" and had an empty spy.properties file to use default values. I was able to see the p6spy logs. I upgraded the spring boot version from 2.5.5 to…
0
votes
1 answer

Config P6Spy on Quarkus log result sql

I try config P6spy in my quarkus project successfully. But now I want it log result sql. How to P6spy log result sql? this is my code: p6spy p6spy
Thor
  • 1
  • 2
0
votes
0 answers

p6spy logging with gavlyukovskiy / Exception after Installation

I want to add gavlyukovskiy Spring Boot DataSource Decorator to log my SQL. In the pom.xml I added the following dependency: com.github.gavlyukovskiy p6spy-spring-boot-starter
Hubi
  • 1
  • 1
0
votes
1 answer

Spring 2.x multiple datasources and p6spy

I've created a multiple datasource setup with spring-boot. It looks like this: application.yaml: app: db1: jdbc-url:... username:... password:... db2:... Config-class: @Configuration(proxyBeanMethods = false) public class…
Krwasch
  • 29
  • 1
  • 7