Results 1 to 8 of 8

Thread: GWT Add-On Fails

  1. #1
    Join Date
    Apr 2011
    Posts
    14

    Default GWT Add-On Fails

    Executed "web gwt setup" on a project yields errors for all domain objects:

    GWT support requires that a proxied entity has an @Version field accessor method for type <my-domain-class>

    I tried building a new project with the same database reverse engineer, did not manually alter anything, and got the same error. Original project worked great until trying to add the GWT Add-On. Browser shows only a blue box with "loading..." after executing "mvn gwt:run"

    Attached my Roo console output.

    Using 1.1.3.RELEASE [rev 4404ffb] inside STS 2.6.0.RELEASE Build Id: 201103161000.

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    Do your tables have a column called "version". If so, DBRE will create the @Version field in your entities and GWT should then work OK
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Apr 2011
    Posts
    14

    Default

    No, my tables do not have a column for version. In order to work, every table in my DB has to have a version column? Is there another option? My intent is to use Roo + GWT with a legacy database.

  4. #4
    Join Date
    Dec 2005
    Posts
    930

    Default

    The current stipulation of GWT is that each entity is to have an @Version field. Thus the easiest way of doing this with DBRE is to have a column called 'version' in each table. Your entities probably have now @RooEntity(versionField = "'). Removing this attribute would create the version field, however, the ORM will complain if the column is missing
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Apr 2011
    Posts
    14

    Default

    Hm ok. I didn't notice having to create a Version field for entities in the tutorial. Since I'm working with a legacy DB, are there any alternatives to altering each table in the schema? If not, it seems like a pretty big barrier to entry for GWT.

  6. #6
    Join Date
    Apr 2011
    Posts
    14

    Default

    Tried creating a new project from scratch using Hibernate and in-memory DB. I followed instructions similar to the Roo-GWT Tutorial pages and created one simple domain object, then executed "web gwt setup". No errors this time, but when I run the application in Tomcat, I get "loading" stuck again. Viewing source and drilling into applicationScaffold/applicationScaffold.nocache.js, I get a 404 error.

    Roo console output is attached.
    Attached Files Attached Files

  7. #7
    Join Date
    Dec 2005
    Posts
    930

    Default

    Use mvn gwt:run to run the application, not Tomcat
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  8. #8
    Join Date
    Apr 2011
    Posts
    14

    Default

    Got it, thanks. That seems to work.

    My original problem remains, though. Is there another way to satisfy GWT's @Version field without having to add columns to all tables in my legacy Oracle DB?

    I tried yet another project and added a getVersion and setVersion stub methods, but then I get errors like "ApplicationRequestFactory cannot be resolved to a type." I haven't yet found another workaround via web searches. Anyone have suggestions/advice?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •