4 Replies Latest reply on Mar 28, 2013 3:42 PM by mdhirsch30345

    Trouble running with 2.3.0.CR1 in dev mode.

    mdhirsch30345

      I see that the bug which has been keeping me from using 2.2.0 is fixed!  Yay!

       

      So I tried it out.  It compiles fine and even seems to run well, until I try to use dev mode.  It fails with no useful information--at least not useful for me.  This is my main complaint about errai and GWT: when it breaks there is little useful information about what went wrong.

       

      When I try to load my app it quickly fails with:

       

      EntryPoint initialization exception

       

      Exception while loading moduleorg.jboss.errai.marshalling.client.api.MarshallerFramework. See Development Mode for details.

      java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:665) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:373) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Deferred binding failed for 'org.jboss.errai.marshalling.client.api.MarshallerFactory' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at com.google.gwt.core.shared.GWT.create(GWT.java:57) at com.google.gwt.core.client.GWT.create(GWT.java:85) at org.jboss.errai.marshalling.client.api.MarshallerFramework.<clinit>(MarshallerFramework.java:42) ... 8 more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:605) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 11 more

       

      So I look in the dev mode console and get:

       

              00:03:51.522 [ERROR] Unexpected error trying to instantiate Generator 'org.jboss.errai.marshalling.rebind.MarshallersGenerator' 

      java.lang.NoClassDefFoundError: Could not initialize class org.jboss.errai.marshalling.rebind.MarshallersGenerator
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:607)
           at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
           at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
           at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
           at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
           at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
           at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
           at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
           at com.google.gwt.core.shared.GWT.create(GWT.java:57)
           at com.google.gwt.core.client.GWT.create(GWT.java:85)
           at org.jboss.errai.marshalling.client.api.MarshallerFramework.<clinit>(MarshallerFramework.java:42)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:247)
           at com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:665)
           at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:373)
           at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
           at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
           at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
           at java.lang.Thread.run(Thread.java:662)

      Is there a parameter to turn on better logging so that I can track down the issue?  Is there a way to tell what part of my code can't be compiled?

       

      I'm using gwt 2.5.1, if that matters.

        • 1. Re: Trouble running with 2.3.0.CR1 in dev mode.
          cbrock

          My spidey sense tells me theres something wrong with you Errai dependencies. Perhaps you only got part of the artifacts downloaded? I would try, as a matter of course, deleting ~/.m2/repository/org/jboss/errai/ on your machine and trying a clean build to see if that resolves the problem.

          • 2. Re: Trouble running with 2.3.0.CR1 in dev mode.
            mdhirsch30345

            Since I'm not using maven, how would I go about figuring it out?  I downloaded the zip distribution and expanded it, then I put all the errai jars and the errai/deps jars on my path.  I just replaced 2.1.0 with 2.3.1.CR1 in my ant build script.  Are there some additional dependencies?

             

            It's strange to me that it can compile and run fine, but not in dev mode.

             

            I think I'll look some more at classpath issues.

             

            Michael

            • 3. Re: Trouble running with 2.3.0.CR1 in dev mode.
              jfuerth

              Hi Michael,

               

              That is indeed strange that the compile works but dev mode fails.

               

              Can you try compiling with -strict, just to see if this problem slipped by the compiler in non-strict mode? We've seen similar problems with compiling (yeah, compiling, not dev mode) when there are non-translatable classes in a GWT module.

               

              -Jonathan

              • 4. Re: Trouble running with 2.3.0.CR1 in dev mode.
                mdhirsch30345

                Hi Jonathan,

                 

                I turned on -strict, but no luck.  But I kept poking around and discovered that the zip file for 2.3.0.CR1 ships with the jar file slf4j-api-1.6.1.jar in deps/lib.  The zip for 2.1.0 has that jar, and also slf4j-log4j12-1.6.1.jar.  When I copied the second jar into the deps/lib directory for 2.3.0.CR1 it all started working!

                 

                Was that file left out by accident, or am I missing some instructions on how to supply my own slf4j implementation.

                 

                I notice that it is not there in 2.2.0, either.

                 

                So now my problem is the issue with generics I posted to this forum this morning.

                 

                Thanks,

                 

                Michael