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 to see the return values on my eclipse. However, when i use mvn build and run it i get:
INFO: HHH000046: Connection properties: {user=root, password=****}
Failed to create sessionFactory object.java.lang.NullPointerException
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
at foo.bar.Main.main(Main.java:36)
... 6 more
Caused by: java.lang.NullPointerException
at com.p6spy.engine.spy.P6SpyDriverCore.connect(P6SpyDriverCore.java:371)..
i tried to use 1.3 but see : ERROR: Unable to find a driver that accepts jdbc:p6spy:mysql://localhost:3306/testdb
i used deregistered=true but that didnt work.
Now, if i use the version below it is fine:
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>2.1.4</version>
</dependency>
However, when i run my program i see: 1491427383465|37|statement|connection 0|select person0_.personid as ... 1491427383494|0|statement|connection 0|select items0...
How do i get the returned values? i am lost here....