63 questions
0
votes
0
answers
100
views
Issue with p6spy Logging in Spring Boot Application
I’m using p6spy-spring-boot-starter in my Spring Boot application to analyze MySQL queries. I’ve added the following dependencies in my pom.xml:
<dependency>
<groupId>com.github....
0
votes
1
answer
40
views
How to exclude logged sqls by regexExpresstion in p6spy
I want to exclude sqls: select count(*) from trade, insert into task,
how to config?
In spy.properties,belows doesn't work
dateformat=yyyy-MM-dd HH:mm:ss.SSS #this works, so spy.properties works.
...
1
vote
0
answers
144
views
Issue with Sentry JDBC Integration and P6Spy Connection URL Approach in Spring Boot Project
Problem Description:
I have successfully integrated Sentry JDBC into my Spring Boot project following the documentation here. To implement the integration, I opted for the "Connection URL way&...
0
votes
1
answer
334
views
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:
<dependency>
<groupId>p6spy</groupId>
&...
2
votes
2
answers
1k
views
spring-boot-data-source-decorator with p6spy are not logging insert statements
I am using p6spy to log the sql statements.we are using springboot/hibernate for Java ORM mapping.I see only select statements are getting loggged in spy.log.when insert statemnets are executing in ...
0
votes
1
answer
389
views
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:
@...
0
votes
1
answer
327
views
How would I instrument an R2DBC for Spring Cloud Sleuth Zipkin?
For a normal data source I would do the following using P6Spy
@Configuration
@Order(LOWEST_PRECEDENCE)
@Slf4j
public class DataSourceBeanPostProcessor implements BeanPostProcessor {
@Override
...
0
votes
1
answer
600
views
Injecting P6Spy in JBoss results in "Wrong driver class [class com.mysql.jdbc.Driver] for this connection URL"
I'm currently debugging an application deployed over JBoss EAP 6.4.0.GA and I want to use P6Spy to check what the database returns. I downloaded the files from Maven and followed the instructions, ...
0
votes
0
answers
283
views
Something strange happend after spring-boot auto restart
I use a static threadlocal variable store per request sql query count.
As the code
public class App {
public static ThreadLocal<Integer> count = ThreadLocal.withInitial(() -> 0);;
}
...
0
votes
1
answer
449
views
p6spy, create a new log file (with timestamp) at each start
title say it everything. I want to log my sql queries but the problem is, at each program restart it append query in same file because I'm specifying the same in my spy.properties file:
driverlist=com....
0
votes
2
answers
370
views
Example to use P6Spy as Proxy Datasource with Quarkus Application
I am new to Microservices.
In our project, we are creating DB Connections at every service per container.
I was trying to migrate this to a data source but have this problem. Let's say I have Service ...
3
votes
1
answer
1k
views
spring boot with p6spy sleuth traces interpretation
We have been using spring cloud sleuth in our micoservices for tracing. We have also added enabled jdbc level spans from spring data Repository connection, fetch and query. I am seeing some weird jps ...
1
vote
1
answer
642
views
How to use p6spy for standalone application that limits its JDBC drivers?
I have a standalone 3rd party application working with Oracle database and I need to troubleshoot its DB queries. And I don't have access to its source code (nor desire to decompile it :-) ).
Its DB ...
1
vote
1
answer
538
views
Configure P6Spy on Quarkus
I'd like to use P6Spy with Quarkus but am unable to configure it by following generic instructions. Has anyone managed to get these two working together?
4
votes
0
answers
338
views
Use p6spy to log Spark JDBC datasource
I would like to log the JDBC statements that my Spark job executes with the help of p6spy.
Using p6spy is usually straightforward: one inserts the string :p6spy: into the jdbc url and includes the ...
0
votes
1
answer
1k
views
P6Spy Spring Boot starter decorator produces empty output
I configured a Spring Boot starter P6Spy decorator as per the instructions on their site:
## p6spy ###
# Register P6LogFactory to log JDBC events
decorator.datasource.p6spy.enable-logging=true
...
0
votes
1
answer
580
views
Does ps6spy support currentSchema in postgresql url parameter?
I use p6spy-3.8.6 and postgresql-42.2.9.jre7 modules in WildFly 10 to define datasource.
In standalone.xml if I use it's
I ok - <connection-url>jdbc:postgresql://localhost:5432/migrazione?...
3
votes
2
answers
3k
views
p6spy outputs sql messages twice with spring boot
I want to show sql parameters via p6spy in spring boot, because hibernate is showing sql parameters quite bulky. But for some reason p6spy logger output sql message twice although actually queries to ...
0
votes
2
answers
742
views
P6Spy. How detect outage statement?
I'm trying to use p6spy for logging outage sql-statement. Based on official doc (http://p6spy.readthedocs.io/en/latest/index.html) I can do it by set specific properties in spy.properties file such as ...
1
vote
1
answer
3k
views
Specify user's home directory in a .properties file
I am trying to integrate p6spy (3.x.x) in my project, and in spy.properties file, I wanted to specify
logfile=${user.home}/logs/spy-%d{yyyyMMdd}.log
or at least
logfile=${user.home}/logs/spy.log
...
-1
votes
1
answer
159
views
Will P6SPY logging work with IBM Websphere 7 App Server?
I have setup P6Spy with Tomcat successfully. Can anyone tell me How to configure P6spy for IBM WebSphere 7? Is there any way?? The reason I posted here is because it isreally difficult finding any ...
0
votes
1
answer
5k
views
Gradle test dependencies not loaded in Spring Boot test
I am trying to work with p6spy in Spring Boot tests. I have a test class annotated with
@RunWith(SpringRunner.class)
@SpringBootTest
My gradle.build looks like this
dependencies {
compile('org....
3
votes
2
answers
1k
views
P6Spy does not log hibernate update with HSQLDB
I'm trying to set up a simple project using HSQLDB to explain Hibernate basics.
For a better understanding of Hibernate internal's I would like to install P6Spy to show corresponding SQL statements.
...
0
votes
1
answer
598
views
p6spy 3.x configuration (avoid No visible constructors in class com.p6spy.engine.wrapper.ConnectionWrapper)
I am upgrading P6SPY on our Java applications based on Spring framework.
Current p6spy version is 2.1.4 and we want at least version 3.0.0 (or 3.2.0).
After I changed version in pom.xml and deployed ...
1
vote
1
answer
1k
views
How to configure p6spy for mssql server with hibernate?
In our web application we are using spring, hibernate & sql server 2016 as db. We are using jndi to connect to the database. To record all the queries executed by hibernate I am trying to ...
0
votes
1
answer
124
views
Having trouble logging HQL return values using log tools
I am trying to log the return values from HQL and I followed the following instructions:
https://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-solution/
I was able to use 1.1 ...
3
votes
1
answer
581
views
exclude include in p6spy not working
I was trying p6spy filter option. I am using p6spy version 2+
I need to exclude logs with select statements.
My properties file is shown below.
filter=true
include=
exclude=select [a-z,_, , =, ']*
...
0
votes
1
answer
385
views
how to analyse P6spy log live and from log files?
With old version 1.3 of p6spy.jar you could plug the irontrack UI live and also read spy.log afterwards to analyse SQL activity.
What tool could do the same with p6spy version 2.x.x format ?
1
vote
2
answers
9k
views
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 ...
1
vote
2
answers
608
views
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 ...
3
votes
2
answers
5k
views
How to configure p6spy to redirect its output into a file
I was able to successfully configure P6Spy to intercept the JDBC calls and output them to Eclipse's console. However, I'd like to have those logs with the binding parameters captured in the file. ...
1
vote
3
answers
6k
views
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 ...
3
votes
2
answers
2k
views
How can I configure sql logging with the Flyway gradle plugin?
I'm using the standard Flyway Gradle plugin from Flyway 3.2.1
Flyway doesn't seem to output any SQL logging, at least not at debug level.
I've configured p6spy and I can now see the SQL that Flyway ...
0
votes
1
answer
84
views
p6spy makes Tomcat8 will no longer redeploy when in use
Cannot redeploy tomcat when I am using p6spy on top of my Postgres database driver.
It works great until redeploy. When I do a redeploy, I get this error:
javax.management....
1
vote
2
answers
2k
views
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....
0
votes
1
answer
378
views
Capturing sql queries along with bind parameters into log files
I used p6spy/log4jdbc to capture the sql queries along with the bind parameters, connecting to Oracle database (hibernate 4.3.5 and oracle 10g is used) and push it to log files which are configured ...
0
votes
1
answer
681
views
configuring logs of hibernate as per P6SPY to see the actual parametre values in logs
I am using hibernate in my java project but the hibernate i am using is a legacy one means the version which i am using is hibernate 3 more over i am using the hibernate of spring one that is spring ...
0
votes
1
answer
179
views
How to implement a adapter pattern (or a more eloquent solution to the following situation)?
Problem (small concise version): I have a jar file that I can edit, but I want to make a method, in a specific class in that jar to call another class that will be under another jar.
The idea is that ...
1
vote
0
answers
175
views
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 ...
0
votes
1
answer
5k
views
ClassNotFoundException for P6Spy when trying to log sql requests
I'm getting this exception :
java.lang.ClassNotFoundException: com.p6spy.engine.spy.P6SpyDriver
while trying to connect to my database through P6Spy Proxy Driver. This exception is pointing to ...
3
votes
1
answer
2k
views
Generate a SQL script from Hibernate
I'm using Hibernate 4.3.5-Final for my Java Swing application and I do many UDPATE, INSERT and DELETE with it (in HQL or with Criteria).
Now, what I'm trying to do is to export a SQL script of all ...
0
votes
1
answer
1k
views
Logging queries from Hibernate 4.3 (with SLF4J+Logback or P6SPY)
I am using Glassfish 4 and Hibernate 4.3.
How can I log every query from Hibernate?
My first try involved SLF4J 1.7.7 and Logback 1.1.2.
I have tried some tutorials using SLF4J and Logback, but with ...
2
votes
2
answers
2k
views
P6SpyDriver cannot be cast to javax.sql.XADataSource exception while trying to configure P6Spy 2.0 with xa-datasource using Jboss AS 7 and potgres
P6spy v2 has a support for xa datasources - P6spy on github
In my jboss AS 7 standalone-full-ha.xml, i have the following datasource configurations.
<xa-datasource jndi-name="java:jboss/...
5
votes
1
answer
13k
views
capture final SQL query generated by hibernate JPA in JBoss AS 7
I have been trying really hard to capture the exact SQL of a really complicated JPA query in my project for the purpose of optimization but so far i am unable to do so. I have tried the following ways:...
6
votes
5
answers
5k
views
Only show effective SQL string P6Spy
I'm using p6spy to log the sql statements generated by my program. The format for the outputted spy.log file looks like this:
current time|execution time|category|statement SQL String|effective SQL ...
2
votes
2
answers
6k
views
P6Spy not logging SQL
I have a program that updates tables in a database using prepared statements, and I'm trying to see the output of all the SQL statements that are implemented.
My research suggested P6Spy which ...
4
votes
2
answers
6k
views
Usage of P6Spy with datasource in Spring applicationContext.xml
I am using Hibernate 4, Spring 3, JSF 2.0 and Weblogic 10.3.6 as server.
I have created datasource on Weblogic server and in applicationContext.xml I have defined datasource as
<!-- Data Source ...
3
votes
2
answers
4k
views
How to Configure P6Spy with OracleConnectionPoolDataSource in specific
We are using Oracle connection Pooling mechanism in our project as our application uses some oracle specific features.
The configuration of our datasource in jetty.xml is as follows:
<Call name="...
2
votes
4
answers
3k
views
How to setup p6spy driver in Arquillian tests on jBoss 7.x?
Apart from setting up the module in
JBOSS_HOME/modules/com/p6spy/main
adding p6spy.jar and module.xml saying:
<module xmlns="urn:jboss:module:1.0" name="com.p6spy">
<resources>
&...
1
vote
2
answers
1k
views
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 (...