Hi,

We have a problem while deploying two different war files including
metro webservice implementations into single jetty instance. We get
the following exception while creating the injector in production
stage:

java.lang.RuntimeException: Multiple injectors detected. Please
install only one ServletModule in your web application. While you may
have more than one injector, you should only configure guice-servlet
in one of them. (Hint: look for legacy ServetModules or multiple calls
to Servlets.configure()).
com.google.inject.servlet.GuiceFilter.setPipeline(GuiceFilter.java:83)

The war files just work fine if we deploy them separately into
different JVMs. We use the recommended pattern of a single
GuiceServletContextListener, with one
Guice.createInjector() call in each application context (war file).

I checked Guice source code a little bit and saw that GuiceFilter is
checking a static field "GuiceFilter.pipeline" and throws this
exception and as I understand this means in one JVM I can not have
multiple application context using GuiceServletContextListener and
ServletModule.

Is this the right assumption? Is there a workaround for this issue?

thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to