Announcement Announcement Module
Collapse
No announcement yet.
GWT Add-On Fails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment


        • #5
          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.

          Comment


          • #6
            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.

            Comment


            • #7
              Use mvn gwt:run to run the application, not Tomcat

              Comment


              • #8
                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?

                Comment

                Working...
                X