Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6797029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:33:30+00:00 2026-05-26T18:33:30+00:00

I am developing a hibernate console application and refer to this article http://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-solution/ to

  • 0

I am developing a hibernate console application and refer to this article http://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-solution/ to setup the P6Spy in order to see what is the actual value of the “(?)” of the SQL generated by the Hibernate.

The setup should work fine as I can see info/debug messages output by P6Spy during the application starts up. However ,after that, P6Spy seems that it cannot intercept any JDBC statements. From the log generated by hibernate (eg: Hibernate: insert into Module (projectName, moduleName, projectId) values (?, ?, ?) ), it can be sure that the JDBC statements are already sent to the database.

The following is my setting:

hibernate.cfg.xml

  • Already specified to use the P6Spy
    driver : <property
    name="hibernate.connection.driver_class">com.p6spy.engine.spy.P6SpyDriver</property>
  • Already turned on the
    hibernate.show_sql property :
    <property
    name="hibernate.show_sql">true</property>

spy.properties

  • Already changed to use my actual
    database JDBC driver , filter set to
    false , includecategories already
    explicitly set to log anything.
module.log=com.p6spy.engine.logging.P6LogFactory
realdriver=oracle.jdbc.driver.OracleDriver
filter=false
dateformat=yyyy.MM.dd HH:mm:ss
excludecategories=
includecategories=error, info, batch, debug,statement,commit,rollback,result
appender=com.p6spy.engine.logging.appender.StdoutLogger

Do I miss any important setting ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:33:31+00:00Added an answer on May 26, 2026 at 6:33 pm

    Finally , I give up P6Spy as it is the old library which the latest version is back to 2003. I resort to use another similar free open source called log4jdbc to intercept the JDBC statements , see this for more info if you are interested.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web application using Wicket+Spring+JPA+Hibernate. This is my first project with this
I am developing a hibernate application that connects to a MySQL database. The customers
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
Hey I am developing an desktop application using Spring and Hibernate, and I have
we are developing a J2SE application and we are using Hibernate for our persistence
We are developing a web application using Spring framework and Hibernate ORM. As far
I am using Spring Web MVC and Hibernate for developing my application. My login.jsp
I am using Spring, Hibernate for developing my application. And as DB side, I
I'm developing a web application on Apache Tomcat 6 with Hibernate and Spring, I'm
I am developing a web application using GXT, Hibernate, mysql etc. There is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.