I use JPA specification and Hibernate as my vendor. I need somehow to take the generated SQL Query which is sent to the the DB (printed to the sysout) and save it as a simpl
You have to enable the log4j logging and add an appender for Hibernate to show the queries.
This has already been described here: How to print a query string with parameter values when using Hibernate