3 Replies Latest reply: Mar 18, 2013 4:13 PM by Christian Sadilek RSS

No proxy provider found

Anton Hughes Novice

Hi

 

I'm trying to get a RPC service working.

 

I have in my App.java file (which has the @EntryPoint )

  @AfterInitialization
  public void callRpcSvc(){
            MessageBuilder.createCall(new RemoteCallback<Boolean>() {
                      @Override
                    public void callback(Boolean isHappy) {
                        if (isHappy) Window.alert("Everyone is happy!");
                      }
                     }, MyRemoteService.class).isEveryoneHappy();
  }

 

My service is:

 

package rpcservice.client.local;


import org.jboss.errai.bus.server.annotations.Remote;


@Remote
public interface MyRemoteService {
            public boolean isEveryoneHappy();
}

 

And my implementation is:

 

package rpcservice.server;


import org.jboss.errai.bus.server.annotations.Service;




@Service
public class MyRemoteServiceImpl {
          public boolean isEveryoneHappy() {
              System.out.println("inside rpc remote method");
              return true;
            }


}

 

In my web.xml I have:

 

<servlet>
        <servlet-name>ErraiServlet</servlet-name>
        <servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class>
        <init-param>
                        <param-name>auto-discover-services</param-name>
                        <param-value>true</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
    </servlet>

 

And yet this is the error I am getting:

 

 

                00:00:27.012 [ERROR] Async Task Execution Failed. Future executions (if any) are cancelled. 

java.lang.RuntimeException: No proxy provider found for type:rpcservice.client.local.MyRemoteService
     at org.jboss.errai.bus.client.framework.RemoteServiceProxyFactory.getRemoteProxy(RemoteServiceProxyFactory.java:42)
     at org.jboss.errai.bus.client.api.builder.DefaultRemoteCallBuilder.call(DefaultRemoteCallBuilder.java:63)
     at org.jboss.errai.bus.client.api.builder.DefaultRemoteCallBuilder.call(DefaultRemoteCallBuilder.java:59)
     at org.jboss.errai.bus.client.api.base.MessageBuilder.createCall(MessageBuilder.java:185)
     at rpcservice.client.local.App.callRpcSvc(App.java:86)
     at org.jboss.errai.ioc.client.BootstrapperImpl$12$1.run(BootstrapperImpl.java:120)
     at org.jboss.errai.common.client.api.extension.InitVotes.finishInit(InitVotes.java:261)
     at org.jboss.errai.common.client.api.extension.InitVotes.access$3(InitVotes.java:253)
     at org.jboss.errai.common.client.api.extension.InitVotes$1.run(InitVotes.java:159)
     at org.jboss.errai.common.client.api.tasks.ClientTaskManager$ClientAsyncTask.run(ClientTaskManager.java:89)
     at org.jboss.errai.common.client.api.tasks.ClientTaskManager$TaskManagerTimer.run(ClientTaskManager.java:190)
     at com.google.gwt.user.client.Timer.fire(Timer.java:149)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
     at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
     at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
     at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
     at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
     at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
     at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
     at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
     at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
     at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
     at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
     at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
     at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
     at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
     at java.lang.Thread.run(Thread.java:722)