2012-07-25 4 views
0

요청 팩토리를 사용하려는 maven + spring + gwt 프로젝트가 있습니다. 나는 왜 내가이 예외를 얻는지를 알 수 없다.요청을 실행하면 GWT RequestFactory 오류가 발생합니다. org.springframework.beans.factory.NoSuchBeanDefinitionException

요청 공장 :

public interface StarRequestFactory extends RequestFactory { 

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

RaduRequestContext raduRequestcontext(); 
} 

서비스 :

public class RaduService { 

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

} 

는 로케이터 :

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

     @Override 
     public void onSuccess(Void response) { 
      System.out.println("Success"); 

     } 
    }); 
,691 : 내 엔트리 포인트 클래스에서
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; 
    } 

} 

내가 요청을

[ERROR] IUL 25, 2012 오후 3시 35분 36초 com.google.web.bindery.requestfactory.server.RequestFactoryServlet의 doPost [ERROR] SEVERE : 나는 다음과 같은 오류가이 요청에 363,210

예기치 않은 오류 [ERROR] org.springframework.beans.factory.NoSuchBeanDefinitionException : [com.base.star.shared.services.StarRequestFactory $ RaduRequestContext] 유형의 고유 bean이 정의되지 않았습니다. 예상되는 단일 bean이지만 발견 됨 0 : [ERROR] at org.springframework.context.support.AbstractApplicationContext.getBean에서 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean (DefaultListableBeanFactory.java:269) [ERROR (AbstractApplicationContext.java:1083) [ERROR] 위치에 com.base.star.server.integration.GWTServiceLayerDecorator.createServiceInstance에서 com.base.star.server.integration.GWTServiceLocator.getInstance (GWTServiceLocator.java:25) [ERROR (GWTServiceLayerDecorator.java:43) [ERROR] 위치에 sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)에서 sun.reflect.NativeMethodAccessorImpl.invoke에서 sun.reflect.NativeMethodAccessorImpl.invoke0 (원시 메소드) [ERROR (NativeMethodAccessorImpl.java:57) [ERROR] [오류] java.lang.reflect.Method.invoke에서 (Method.java:601) [오류] com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache (ServiceLayerCache.java:233)에서 [오류 ] at com.google.web.bindery.requestfactory.server.ServiceLayerCache.createServiceInstance (ServiceLayerCache.java:117) com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages (SimpleRequestProcessor.java:451)에서 [ERROR] [오류] com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process (SimpleRequestProcessor. java : 225) [오류] com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process (SimpleRequestProcessor.java:127) .................. ........................................

누구인지 압니까? 약?

필요한 경우 게시 할 수 있습니다.

답변

1

는 봄 오류로 보인다 :

당신이 @ServiceRaduService 클래스에 주석이나 콩 같은 ApplicationContext.xml 파일에 정의 했습니까?

+0

ApplicationContext.xml에 다음과 같이 정의했습니다.

+0

서비스 코드를 디버그하고"GWTServiceLocator "의"public Object getInstance (Class clazz) "에 중단 점을 넣고 인스턴스화하려고 시도한 내용을 확인하십시오 –

+0

인터페이스를 시도합니다. –

관련 문제