I'm currently Working on a GWT 2.4 / Spring 3 application and want to
use the RequestFactory API to communicate with Spring services.

I searched and find that to integrate GWT integrate with Spring
beginning from 2.4 you just need to create a custom ServiceLocator
that expose your Spring beans.

public class SpringServiceLocator implements ServiceLocator {

public Object getInstance(Class<?> clazz) {
    ApplicationContext context =
WebApplicationContextUtils.getWebApplicationContext(
            RequestFactoryServlet.getThreadLocalServletContext());
    return context.getBean(clazz);
}

}

And you need to configure you RequestFactoryServlet as mentioned on
the Google documentation.

I followed theses steps but my when GWT client make a Request to the
Back-end i receive this Exception :

  Sep 13, 2011 7:42:34 AM
com.google.web.bindery.requestfactory.server.RequestFactoryServlet
doPost
SEVERE: Unexpected error
java.lang.ArrayIndexOutOfBoundsException: 1
    at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:
425)
    at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:
217)
    at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:
125)
    at
com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:
118)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
    at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
    at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
    at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
    at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
    at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
    at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
    at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
380)
    at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
    at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
[ERROR] 500 - POST /gwtRequest (127.0.0.1) 1420 bytes

Did I miss something on the configuration ??

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to