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; @Override public Object getInstance(Class<?> clazz) { return context.getBean(clazz); } @Override 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>() { @Override public void onSuccess(Void response) { System.out.println("Success"); } }); 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.aievas.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.aievas.star.server.integration.GWTServiceLocator.getInstance(GWTServiceLocator.java:25) [ERROR] at com.aievas.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. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/V3Bbn8SE25sJ. 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.