Hello, this is my first topic!! sorry for my bad English, I do not write very well. my question is how to display the
parameters binding in the query sql????
I have a project with JPA in JBoss AS 7.1.1 and I have this in my persistence.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="PruebaJBossJPAPU"
transaction-type="JTA">
<jta-data-source>java:/bdjpahibDS</jta-data-source>
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.use_sql_comments" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
</properties>
</persistence-unit>
</persistence>
I have in my log4j.properties (located in WEB-INF/classes) this:
Code:
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug, stdout
log4j.logger.org.hibernate=debug
log4j.logger.org.hibernate.SQL=debug
log4j.logger.org.hibernate.type=debug
log4j.logger.org.hibernate.tool.hbm2ddl=debug
log4j.logger.org.hibernate.jdbc=debug
also I have a jboss-deployment-structure.xml file in META-INF:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding
some dependencies -->
<exclusions>
<module name="org.apache.log4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>
and I have the following libraries in WEB-INF/lib:
log4j-1.2.16.jar
jcl-over-slf4j-1.7.1.jar
slf4j-api-1.7.1.jar
slf4j-log4j12-1.7.1.jar
but only shows the SQL query, no parameters displays.
Please appreciate any help. Thanks in advance!!