0

We had a java application which accessed GWT server code with SyncProxy 0.3 and GWT 2.6.0. After putting the null.gwt.rpc file in the root of the bin directory it worked fine.

We are now trying to use a normal Webapp (not GWT) to acesss the GWT server on the same tomcat server 7.0. We get the infamous FileNotFound exception for mywebapp.nocache.js Where should the rpc file go? Any other suggestions to get this to work?

  • Also tried syncproxy 0.5 lib got Jul 17, 2016 6:28:37 PM com.gdevelop.gwt.syncrpc.RpcPolicyFinder searchPolicyFileInClassPath INFO: No RemoteService in the classpath java.lang.RuntimeException: java.io.FileNotFoundException: http://127.0.0.1:8081/webfrontend/webfrontend.nocache.js at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:490) at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:460) at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:427) – Alan J. Jul 17 '16 at 15:10
  • Can you confirm the server side was GWT-Compiled? The 0.3 and 0.4 versions had a bug which did not work correctly in all instances with gwt 2.5/2.6. The latest version 0.5 had code to counter and act appropriately, but was targeting GWT 2.7.0. – JCricket Jul 17 '16 at 21:09
  • Confirm that server side was Gwt compiled and works with Plain old Java running on server calling GWT. Problem is non GWT webapp calling the GWT from same Tomcat server. – Alan J. Jul 18 '16 at 16:03
  • @JCricket I tried a new Plain old Java App and I get the same error. I think I somehow convinced the old app not to fetch the null.gwt.rpc file from the server but to take it from the local (client) classpath, but don't remember how to do this. – Alan J. Jul 24 '16 at 20:59
  • although the 0.5 lib was a modest improvement in logic for the syncproxy system, logging is still lacking. I've been working on an update, 0.6.x, that makes significant logging enhancements that would probably help track down your specific issue, but I haven't had time to finish. Checkout the develop branch and compile locally (there's gradle publish command to locally deploy the library). It might be several weeks/month(s) before I can do it. https://github.com/jcricket/gwt-syncproxy. Latest logging will tell you where it's pulling files from (local path or remote address) – JCricket Jul 24 '16 at 21:14
  • Here is the code package il.ac.haifa.is.pil.ls; import com.gdevelop.gwt.syncrpc.SyncProxy; public class Sender { static String domain = "http://pilmus.cri.haifa.ac.il:8081/webfrontend/"; static PILService service; static public void send(String blind, String pos, int cA, String msg) { try { SyncProxy.setBaseURL(domain); service = (PILService ) SyncProxy.createSync(PILService.class); service.updatePosition(blind,pos, 0, msg); } catch (Exception e) { e.printStackTrace(); }} public static void main(String[] args) { send(19,"Entrance", 0, "data"); } } – Alan J. Jul 24 '16 at 21:14
  • GWT is pretty complex, one file I'm afraid isn't sufficient help diagnose the issue. If you can put your project on github or similar that replicates the issue, I can try to take a look at it from there – JCricket Jul 24 '16 at 21:20

0 Answers0