Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2931

GWT compilation errors when proxies or requests are in non-default package


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0.RC1
    • Fix Version/s: 1.2.0.RELEASE
    • Component/s: GWT
    • Labels:
    • Environment:
      Windows 7, Roo 1.2.0.RC1 (also M1), GWT 2.4, Eclipse 3.5


      I'm having some problems getting GWT working properly - I am using the latest 1.2.0.RC1, downloaded this morning.

      I am trying to create a simple GWT version of the pizza shop sample, executing the following commands:

      // Spring Roo 1.2.0.RC1 [rev dcaa483] log opened at 2011-11-24 09:50:14
      project --topLevelPackage com.springsource.roo.pizzashopRC1
      persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
      entity jpa --class ~.domain.Topping --testAutomatically
      field string --fieldName name --notNull --sizeMin 2
      entity jpa --class ~.domain.Base --testAutomatically
      field string --fieldName name --notNull --sizeMin 2
      entity jpa --class ~.domain.Pizza --testAutomatically
      field string --fieldName name --notNull --sizeMin 2
      field number --fieldName price --type java.lang.Float
      field set --fieldName toppings --type ~.domain.Topping
      field reference --fieldName base --type ~.domain.Base
      entity jpa --class ~.domain.PizzaOrder --testAutomatically
      field string --fieldName name --notNull --sizeMin 2
      field string --fieldName address --sizeMax 30
      field number --fieldName total --type java.lang.Float
      field date --fieldName deliveryDate --type java.util.Date
      field set --fieldName pizzas --type ~.domain.Pizza
      // script pizzaEntities.roo
      web gwt setup
      web gwt all --proxyPackage ~.gwt.proxy --requestPackage ~.gwt.request
      perform eclipse

      So far, so good. But when I import the project into Eclipse, I get the following build error:

      The project 'pizzashoprc1' does not have any GWT SDKs on its build path

      I can fix this by manually adding the GWT SDKs into the build path (I'm using GWT 2.4). However, when I try to start the app from Eclipse, using the Run As > Web Application, I get the error:

      Could not find any host pages in project pizzashoprc1.

      I can launch the app from the command line using mvn gwt:run, but then I get the following error when I go to the URL in a browser:

      onModuleLoad() threw an exception
      Exception while loading module com.springsource.roo.pizzashoprc1.client.scaffold.Scaffold. See Development Mode for details.
      java.lang.reflect.InvocationTargetException 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.ModuleSpace.onLoad(ModuleSpace.java:396)
       at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
       at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
       at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.springsource.roo.pizzashoprc1.client.scaffold.ioc.DesktopInjector' (did you forget to inherit a required module?)
       at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
       at com.google.gwt.core.client.GWT.create(GWT.java:97)
       at com.springsource.roo.pizzashoprc1.client.scaffold.ioc.DesktopInjectorWrapper.getInjector(DesktopInjectorWrapper.java:8)
       at com.springsource.roo.pizzashoprc1.client.scaffold.Scaffold.onModuleLoad(Scaffold.java:16)
       ... 9 more 
      Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
       at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
       at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
       at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
       ... 12 more

      I've also attached a screenshot of the error in the GWT Dev Mode console.




            • Assignee:
              aswan Andrew Swan
              ammwhite Andrew White
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: