Status: New
Owner: ----

New issue 611 by [email protected]: Struts2 plug-in fails with custom type converters
http://code.google.com/p/google-guice/issues/detail?id=611

I'm running into a problem whereby the Guice/Struts2 plug-in fails to initialize properly when there are custom type converters defined in xwork-conversion.properties.

The problem appears to be that Struts2 initializes type converters before interceptors (this is done in XWorkConverter). Without the type converters defined, buildInterceptor is called first for each interceptor, so that when buildBean is finally called it properly creates the child injector. With type converters, buildBean is called prior to the calls to buildInterceptor, creating the child injector without the interceptors registered and resulting in a NullPointerException when attempting to invoke an action.

I have created a small test app that shows this problem. Running the app should illustrate the problem as soon as you attempt to invoke the action called "test". If you comment out the entry in xwork-conversion.properties, the app runs as expected.

I'm running the test app under Tomcat 6.

Attachments:
        guice-struts-test.zip  3.9 MB

--
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.

Reply via email to