Only getting SessionFactory Stats

35 views
Skip to first unread message

Michel

unread,
Mar 15, 2011, 5:37:52 AM3/15/11
to Hibernate Profiler
Hello,

I've been a NhProf user for several years now. I'm currently helping
in a java application, and wanted to introduce HProf.

I started off simple:
HibernateProfiler.initialize();

When I launch HProf.exe, I only see SessionFactory Statistics, no
sessions, sqlstatements ...

When I stop Tomcat, I get these SEVERE warnings:

15-mrt-2011 10:34:03 org.apache.catalina.loader.WebappClassLoader
clearReferencesJdbc
SEVERE: The web application [/design-zone] registered the JDBC driver
[org.postgresql.Driver] but failed to unregister it when the web
application was stopped. To prevent a memory leak, the JDBC Driver has
been forcibly unregistered.
15-mrt-2011 10:34:03 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [pool-1-thread-1] but has failed to stop it. This is very
likely to create a memory leak.
15-mrt-2011 10:34:03 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [HProf: 15/03/11 10:20] but has failed to stop it. This
is very likely to create a memory leak.
15-mrt-2011 10:34:03 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [Timer-0] but has failed to stop it. This is very likely
to create a memory leak.
15-mrt-2011 10:34:03 org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: The web application [/design-zone] created a ThreadLocal with
key of type
[hibernatingrhinos.hibernate.profiler.web.HibernateProfilerListener$1]
(value
[hibernatingrhinos.hibernate.profiler.web.HibernateProfilerListener
$1@248adb]) and a value of type [java.lang.String] (value []) but
failed to remove it when the web application was stopped. This is very
likely to create a memory leak.
15-mrt-2011 10:34:04 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180

Michel

unread,
Mar 15, 2011, 7:14:07 AM3/15/11
to Hibernate Profiler
Fixed. Found another thread referencing the same problem. Just for
anyone encountering the same problem:
We changed our dependency from slf4j to slf4j-log4j

from our pom.xml:
...
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>
...

Ayende Rahien

unread,
Mar 15, 2011, 7:52:59 AM3/15/11
to hibernate...@googlegroups.com, Michel
Well, that was quick :-)

Michel

unread,
Mar 15, 2011, 8:41:22 AM3/15/11
to Hibernate Profiler
That's the Ayende effect: asking a question correctly points you in
the direction of a solution.

The warnings when I close Tomcat remain however. When I remove
HibernateProfiler.initialize(); => no warnings.

Any hints?

On Mar 15, 12:52 pm, Ayende Rahien <aye...@ayende.com> wrote:
> Well, that was quick :-)
>

Ayende Rahien

unread,
Mar 15, 2011, 8:47:03 AM3/15/11
to hibernate...@googlegroups.com, Michel
What are the warnings?

Michel

unread,
Mar 15, 2011, 9:12:53 AM3/15/11
to Hibernate Profiler
15-mrt-2011 12:17:20 org.apache.catalina.loader.WebappClassLoader
clearReferencesJdbc
SEVERE: The web application [/design-zone] registered the JDBC driver
[org.postgresql.Driver] but failed to unregister it when the web
application was stopped. To prevent a memory leak, the JDBC Driver has
been forcibly unregistered.
15-mrt-2011 12:17:20 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [pool-1-thread-1] but has failed to stop it. This is very
likely to create a memory leak.
15-mrt-2011 12:17:21 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [HProf: 15/03/11 11:25] but has failed to stop it. This
is very likely to create a memory leak.
15-mrt-2011 12:17:21 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/design-zone] appears to have started a
thread named [Timer-0] but has failed to stop it. This is very likely
to create a memory leak.
15-mrt-2011 12:17:21 org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: The web application [/design-zone] created a ThreadLocal with
key of type
[hibernatingrhinos.hibernate.profiler.web.HibernateProfilerListener$1]
(value
[hibernatingrhinos.hibernate.profiler.web.HibernateProfilerListener
$1@16a1a66]) and a value of type [java.lang.String] (value []) but
failed to remove it when the web application was stopped. This is very
likely to create a memory leak.
15-mrt-2011 12:17:21 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180
Disconnected from server


On Mar 15, 1:47 pm, Ayende Rahien <aye...@ayende.com> wrote:
> What are the warnings?
>

Ayende Rahien

unread,
Mar 15, 2011, 9:41:49 AM3/15/11
to hibernate...@googlegroups.com, Michel
Hm, thanks for catching those. We aren't really aiming at production deployment, but did you call the HibernateProfiler.shutdown() before closing? That should shut things down.

Michel

unread,
Mar 15, 2011, 9:52:10 AM3/15/11
to Hibernate Profiler
Nope. I'm going to try that, and I'll get back to you.

On Mar 15, 2:41 pm, Ayende Rahien <aye...@ayende.com> wrote:
> Hm, thanks for catching those. We aren't really aiming at production
> deployment, but did you call the HibernateProfiler.shutdown() before
> closing? That should shut things down.
>
Reply all
Reply to author
Forward
0 new messages