ZeroTurnaround Support Forum » JRebel Support

GWT problem: NoClassDefFoundError

(8 posts)
  • Started 7 months ago by snorbii
  • Latest reply from AlexTaylor
  • 1 Members Subscribed To Topic

  1. snorbii

    Member
    Posts: 4

    Hello,

    I'm writing a blog entry about setting up a GWT development environment for Eclipse WTP + Maven.
    As a bonus I planned to add JRebel integration to the GWT devmode.
    The project is at: http://jvminside.googlecode.com/svn/trunk/jvminside-gwt-wtp-maven-integration (the rebel.xml file contains absolute pathes but later I will use the maven plugin)

    My initial code is:


    public class GwtDemo implements EntryPoint {
    @Override
    public void onModuleLoad() {
    RootPanel.get().add(new Button("Click me!", new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
    Window.alert("It's working!");
    }
    }));
    }
    }

    Then I change the class to:


    public class GwtDemo implements EntryPoint {
    public interface A {
    String getMessage();
    }

    @Override
    public void onModuleLoad() {
    RootPanel.get().add(new Button("Click me!", new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
    Window.alert(new A() {
    @Override
    public String getMessage() {
    return "123";
    }
    }.getMessage());
    }
    }));
    }
    }

    Something happens


    [INFO] JRebel: Reloading class 'com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1'.

    but I get an error in the GWT console (see below).
    It doesn't matter if I run the gwt application from Eclipse or command line Maven (using mvn gwt:run).

    Maybe is this code modification unsupported by JRebel? If this is the case then I would expect a more informative error message.

    Thanks for your help!
    Regards:
    Norbert Sándor


    00:00:36,874 [ERROR] Uncaught exception escaped
    java.lang.NoClassDefFoundError: com/jvminside/blog/gwtwtpmaven/client/GwtDemo$1$1 at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1$$M$bf92b196.onClick(GwtDemo.java:20) at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1$$A$bf92b196.onClick(<generated>) at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1.onClick(GwtDemo.java:17) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:54) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:52) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:100) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) 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:188) at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1$1 at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:987) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1$$M$bf92b196.onClick(GwtDemo.java:20) at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1$$A$bf92b196.onClick(<generated>) at com.jvminside.blog.gwtwtpmaven.client.GwtDemo$1.onClick(GwtDemo.java:17) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:54) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:52) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:100) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) 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:188) at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619)

    Posted 7 months ago #
  2. lauri

    Member
    Posts: 480

    Add -Drebel.log=true to jvm arguments and send jrebel.log (will be generated to the same directory as jrebel.jar) to support@zeroturnaround.com

    Posted 7 months ago #
  3. snorbii

    Member
    Posts: 4

    Done.

    Posted 7 months ago #
  4. snorbii

    Member
    Posts: 4

    This specific problem seems to be fixed in the latest nightly build, thanks!
    I will test is further :)

    Posted 7 months ago #
  5. snorbii

    Member
    Posts: 4

    It works in my trivial demo application but when I tried in a very complex GWT application, I get the following error on the client side:

    java.lang.IllegalAccessError com/google/gwt/core/client/impl/WeakMapping$IdentityWeakReference

    I get this error when the result of an RPC call is returned to the client and the onSuccess() should be called by GWT, but instead onFailure() is called with the exception above.

    Posted 7 months ago #
  6. Alex Taylor

    guest

    I'm also getting this, i.e.:

    java.lang.IllegalAccessError com/google/gwt/core/client/impl/WeakMapping$IdentityWeakReference

    Environment is jdk-1.6.0-18, GWT-2.0 (Final), Jetty server, and JRebel (occurs in 2.2, 3.0-M2, and 3-nightly). Confirmed not happening when jrebel is not set as the javaagent.

    Posted 6 months ago #
  7. lauri

    Member
    Posts: 480

    Could you add -Drebel.log=true to jvm arguments and send jrebel.log (by default will be generated to the same folder as jrebel.jar) along with full stactrace to support@zeroturnaround.com

    Posted 6 months ago #
  8. AlexTaylor

    Member
    Posts: 1

    Hi,
    Sent to support@zeroturnaround.com - thanks for your help.

    Posted 6 months ago #

RSS feed for this topic

Reply

(required)

(required)

(optional)

(required)

Allowed markup: a blockquote code em strong ul ol li.
Put code in between `backticks`.

Olark Livehelp