Thank You, You can find the files here:
web.xml: http://paste.pocoo.org/show/308623/ applicationContext.xml : http://paste.pocoo.org/show/308625/ webmvc-config.xml: http://paste.pocoo.org/show/308626/ My JavaCode: http://paste.pocoo.org/show/308639/ this code lives on the server side, using RequestFactory mechanism, the call from the GWT Client, ends up accessing this class (SpringServiceLocator), (through RequestFactoryServlet) to get hold of a Bean, this Bean is then used to perform the service required to fulfill client's request. and then hand in the result to RequestFactoryServlet to get it back to the client this class' responsibility is to lookup Spring's Application Context, to find the Bean, and pass it to RequestFactoryServlet. this is done through look up of Spring's ApplicationContext. The problem comes from GWT's RequestFactoryServlet taking full control. GWT's RequestFactoryServlet: http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/requestfactory/server/RequestFactoryServlet.html http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/index.html?com/google/gwt/requestfactory/server/package-summary.html just to clarify, I am not using GWT-RPC, I am using RequestFactory mechanism, which uses RequestFactoryServlet. my Spring applicationContext.xml is correctly configured, when I perform a programmatic look-up using : ClassPathXmlApplicationContext, it works, also when unit-testing server-side spring code in isolation. however, when trying to do end-to-end integration testing within JRE and GWTTestCase, when the client call from GWT client reaches the Server (using RequestFactoryServlet), it would naturally be Spring's turn to take over, and I expected the ApplicationContext being automatically initialized, because DispatcherServlet supposed to be the first Servlet to take control, BUT the client call directly goes to GWT's RequestFactoryServlet. and Spring's applicationContext never gets initialized. the @Autowired ApplicationContext remains Null, and result in NPE. in the service method if I programmatically initialize ApplicationContext, through ClassPathXmlApplicationContext, AppContext gets loaded, and everything works. But this is strange, Normally one does not need to manually initialize Spring's context in a service method. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
