wood burning stoves 2.0*
The moose likes GWT and the fly likes GWT RequestFactory Error when firing request : org.springframework.beans.factory.NoSuchBeanDefinitio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT RequestFactory Error when firing request : org.springframework.beans.factory.NoSuchBeanDefinitio" Watch "GWT RequestFactory Error when firing request : org.springframework.beans.factory.NoSuchBeanDefinitio" New topic

GWT RequestFactory Error when firing request : org.springframework.beans.factory.NoSuchBeanDefinitio

Radu Chilom

Joined: Jul 25, 2012
Posts: 1
I have a maven+spring+gwt project in which i want to use request factory. I just can't figure out why I get this exception.

Request factory:

public interface StarRequestFactory extends RequestFactory {

@Service(value = RaduService.class, locator = GWTServiceLocator.class)
public interface RaduRequestContext extends RequestContext {
Request<Void> save( );

RaduRequestContext raduRequestcontext();

Service :

public class RaduService {

public void save(){
System.out.println("You have saved.");


Locator :

public class GWTServiceLocator implements ServiceLocator,
ApplicationContextAware {
private ApplicationContext context;

public Object getInstance(Class<?> clazz) {
return context.getBean(clazz);

public void setApplicationContext(ApplicationContext context)
throws BeansException {
this.context = context;


In my entrypoint class i make the request :

requestFactory.raduRequestcontext().save().fire(new Receiver<Void>() {

public void onSuccess(Void response) {


On this request i get the following error :

[ERROR] Iul 25, 2012 3:35:36 PM com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
[ERROR] SEVERE: Unexpected error
[ERROR] org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.base.star.shared.services.StarRequestFactory$RaduRequestContext] is defined: expected single bean but found 0:
[ERROR] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:269)
[ERROR] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
[ERROR] at com.base.star.server.integration.GWTServiceLocator.getInstance(GWTServiceLocator.java:25)
[ERROR] at com.base.star.server.integration.GWTServiceLayerDecorator.createServiceInstance(GWTServiceLayerDecorator.java:43)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233)
[ERROR] at com.google.web.bindery.requestfactory.server.ServiceLayerCache.createServiceInstance(ServiceLayerCache.java:117)
[ERROR] at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:451)
[ERROR] at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:225)
[ERROR] at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)

Does anyone know what is this about ?

I can post the pom if needed.
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
have you found a solution? i have the same problem
Consider Paul's rocket mass heater.
subject: GWT RequestFactory Error when firing request : org.springframework.beans.factory.NoSuchBeanDefinitio
Similar Threads
GWT RequestFactory with() method to load nested property which is a Set returns one object only
Spring-ws client with Jax-ws web service
Integration of Spring with a servlet
Some help required for understanding spring lifecycle
Creating Beans by invoking static factory method