Thanks for the pacth! i was having this problem but i didn't have the time to debug it
On Fri, Jun 19, 2009 at 10:41 PM, Greg Lindholm <greg.lindh...@gmail.com>wrote: > > Here is a patch which seems to work. > > Index: struts2/plugin/src/com/google/inject/struts2/ > GuiceObjectFactory.java > =================================================================== > --- struts2/plugin/src/com/google/inject/struts2/ > GuiceObjectFactory.java (revision 1021) > +++ struts2/plugin/src/com/google/inject/struts2/ > GuiceObjectFactory.java (working copy) > @@ -213,7 +213,9 @@ > } > > public void destroy() { > - delegate.destroy(); > + if (delegate != null) { > + delegate.destroy(); > + } > } > > public void init() { > > > On Jun 19, 11:36 am, Greg Lindholm <greg.lindh...@gmail.com> wrote: > > I did a little debugging and found that this is pretty repeatable. > > It occurs if Tomcat is started then Stopped without any Guice activity > > happening. > > The 'delegate' member of > > com.google.inject.struts2.GuiceObjectFactory.ProvidedInterceptor gets > > created by the inject() method. If inject() is never called the destroy > > () method throws the NPE. > > > > destroy() needs to check if delegate is null before calling it. > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to google-guice@googlegroups.com To unsubscribe from this group, send email to google-guice+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---