0

this isn't my first RPC try. All others worked well, but I can't figure out, why this doesn't.

    public void confirmRequest(String requestId, boolean confirmWithDefault, List<String> values, final String laneId){
    AsyncCallback<Void> callback = new AsyncCallback<Void>(){
        @Override
        public void onFailure(Throwable caught)
        {
            // TODO Auto-generated method stub

        }

        @Override
        public void onSuccess(Void result)
        {
            Window.alert("jo");
            ServiceCalls.this.mainmenu.getSlidePanel().getLaneMenu().getProperLanes().get(laneId)
                    .getDefaultButton().setText("");
            statusFor();

        }

    };
    getLaneProxy().confirmRequest(requestId, confirmWithDefault, values, laneId, callback);
}

When I run the programm, it does not even throw an exception. It just doesn't do what it should do. Then I debugged it and saw that a ClassNotFoundException was thrown at this point.

AsyncCallback< Void> callback = new AsyncCallback<Void>()
enrybo
  • 1,787
  • 1
  • 12
  • 20
Laura
  • 43
  • 1
  • 10

2 Answers2

0

Assuming you're using GWT 2.5.0, this is a known issue; upgrade to 2.5.1-rc1 where this is fixed.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • mhm how can am i supposed to do this? im using google plugin for eclipse – Laura Feb 08 '13 at 07:54
  • i did it now, with "check for updates". but it still doesnt work -.- – Laura Feb 08 '13 at 08:22
  • 2.5.1-rc1 still hasn't been officially announced so admittedly you couldn't know, and the Eclipse plugin bundle is always late by a few days (if not weeks; they are not made by the same people). 2.5.1-rc1 can be downloaded from https://code.google.com/p/google-web-toolkit/downloads/detail?name=gwt-2.5.1-rc1.zip, and is available on Central for Maven/Ivy/Gradle/etc. users – Thomas Broyer Feb 08 '13 at 08:38
  • ok i changed the sdk and now i cant load my website in dev mode =/ im getting. "java.lang.NoSuchFieldError:warningThreshold" – Laura Feb 08 '13 at 09:02
  • Are you depending JDT/ECJ? https://code.google.com/p/google-web-toolkit/issues/detail?id=4479 – Thomas Broyer Feb 08 '13 at 09:44
  • gosh... now i switched back to the older version and i get the same error -.- i think i destroyed my project. and i'm not experienced enough to solve it =( – Laura Feb 08 '13 at 10:00
  • 2 things: a) read the linked issue → move GWT JARs at the top of your build path, b) as you're probably only using JDT/ECJ on the server-side, try splitting your code into 2 projects: one client-side only that depends on GWT, one server-side only that depends on ECJ/JDT and possibly gwt-servlet.jar. It won't be as simple to launch the DevMode as with a single project, but at least you're sure you won't have incompatible dependencies. Alternatively, just edit the Eclipse launcher for the DevMode and compiler and remove the server-side only dependencies from the classpath. Welcome Classpath Hell – Thomas Broyer Feb 08 '13 at 10:09
  • well but where does my error finally come from? i tried it with AsyncCallback and i got the same error. so it's not because of it. is it because i gave parameters to confirmRequest()? i just wanna know, because all the other rpc calls are working. – Laura Feb 08 '13 at 11:28
  • Assuming GWT 2.5.1-rc1 solved your issue, meaning you really hit issue 7527, then it would come from sending an `Arrays.asList(…)` as your `List` argument (in DevMode). – Thomas Broyer Feb 08 '13 at 13:56
0

I had the same Problem, and found the solution with gridDragon's help. My problem was that the servlet configuration in web.xml was wrong and so my Impl class couldn't be found.

Community
  • 1
  • 1
Armin
  • 351
  • 1
  • 4
  • 29