Status: New
Owner: ----
New issue 698 by [email protected]: Incorrect error report when using
Jersey and Guice and forget to annotate a resource constructor with @Inject
http://code.google.com/p/google-guice/issues/detail?id=698
If I attempt to add a resource to my GuiceServletConfig and then forgot to
annotate the constructor with @Inject, Tomcat will throw a error reporting
that there is a hanging thread or a potential memory leak.
SEVERE: Error listenerStart
SEVERE: Context [/api] startup failed due to previous errors
SEVERE: The web application [/api] appears to have started a thread named
[com.google.inject.internal.util.$Finalizer] but has failed to stop it.
This is very likely to create a memory leak.
SEVERE: The web application [/api] created a ThreadLocal with key of type
[com.google.inject.internal.InjectorImpl$1] (value
[com.google.inject.internal.InjectorImpl$1@495a2dc4]) and a value of type
[java.lang.Object[]] (value [[Ljava.lang.Object;@3f72c47b]) but failed to
remove it when the web application was stopped. Threads are going to be
renewed over time to try and avoid a probable memory leak.
After annotated the constructor this goes away. This isn't a huge issue,
but the error reporting is bad and if I hadn't noticed that I forgot to
annotate the constructor, this could have been a bang my head against the
wall type of day/days.
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.