i trying log return values hql , followed following instructions: https://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-solution/
i able use 1.1 see return values on eclipse. however, when use mvn build , run get:
info: hhh000046: connection properties: {user=root, password=****} failed create sessionfactory object.java.lang.nullpointerexception [warning] java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:498) @ org.codehaus.mojo.exec.execjavamojo$1.run(execjavamojo.java:297) @ java.lang.thread.run(thread.java:745) caused by: java.lang.exceptionininitializererror @ foo.bar.main.main(main.java:36) ... 6 more caused by: java.lang.nullpointerexception @ com.p6spy.engine.spy.p6spydrivercore.connect(p6spydrivercore.java:371)..
i tried use 1.3 see : error: unable find driver accepts jdbc:p6spy:mysql://localhost:3306/testdb
i used deregistered=true didnt work.
now, if use version below fine:
<dependency> <groupid>p6spy</groupid> <artifactid>p6spy</artifactid> <version>2.1.4</version> </dependency>
however, when run program see: 1491427383465|37|statement|connection 0|select person0_.personid ... 1491427383494|0|statement|connection 0|select items0...
how returned values? lost here....
the default setting p6spy not include returned values. can enable adding or updating following lines in spy.properties.
#list of categories exclude: error, info, batch, debug, statement, #commit, rollback , result valid values # (default info,debug,result,resultset,batch) excludecategories=info,debug,result,batch
the full documentation spy.properties other ways provide config @ http://p6spy.readthedocs.io/en/latest/configandusage.html.
Comments
Post a Comment