Greetings I am trying to use gwt service to connect backend and frontend. But for some reason, the onFailure method is caught.

@Override public void start(HasWidgets display, NavigationPlace place) { display.add((Widget)view); String token = Window.Location.getParameter("token"); loginService.verifyToken("123", new AsyncCallback<SessionDTO>() { @Override public void onFailure(Throwable throwable) throws IncompatibleRemoteServiceException { view.setText(throwable.getLocalizedMessage()); } @Override public void onSuccess(SessionDTO sessionDTO) { clientSessionManager.initSession(sessionDTO); homeActivity.get().start(view.getContentPanelMain(), null); } }); } 

And the implementation of the service:

 @Singleton @WebServlet(name = ServletMappingConstants.LOGIN_SERVICE_NAME, urlPatterns = ServletMappingConstants.LOGIN_SERVICE_URL) public class LoginServiceImpl extends RemoteServiceServlet implements LoginService { public SessionDTO verifyToken(String token) { if (token.equals("123")){ return new SessionDTO(); } return new SessionDTO(); } 

What could be the reason for the failure?

    0