Grails
  1. Grails
  2. GRAILS-8520

Scaffolding links from default landing page appear broken 2.0.0

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scaffolding
    • Labels:
      None
    • Environment:
      Windows 7 x64 12GB RAM, STS 2.81

      Description

      Created a new project using 2.0.0, Created 2 domain classes User and Profile including controllers which contain
      static scaffold = true

      run-app deploys, and landing page displays 2 fully qualified controller names.

      then click on user controller link which goes to http://localhost:8080/xxxx/user/index , instantly get 404 with console displaying:

      Error 2011-12-19 23:16:09,034 ["http-bio-8080"-exec-10] ERROR view.ScaffoldingViewResolver - Error generating scaffolded view [/user/index]: D:\Java\grails-2.0.0\grails-resources\src\grails\templates\scaffolding\index.gsp (The system cannot find the path specified)
      Message: D:\Java\grails-2.0.0\grails-resources\src\grails\templates\scaffolding\index.gsp (The system cannot find the path specified)

      Should the scaffolding not implement index to take me to the list view? Going directly to http://localhost:8080/xxxx/user/list does work.
      So I then defined

      def index =

      { redirect(action: "list", params: params) }

      which made no difference and also tried it as a method instead of closure. So I copied the domain and controller classes verbatim to a grails 1.3.7 project and this issue does not occur.

        Issue Links

          Activity

          Hide
          Jeff Scott Brown added a comment -

          Does the problem only occur when you run the app from within STS?

          Show
          Jeff Scott Brown added a comment - Does the problem only occur when you run the app from within STS?
          Hide
          Tim Goodchild added a comment -

          It's a good question. Yes it had also failed on the command line. Today I went back and retried; it still failed.

          But then I ran the following commands on the command line and it now works

          clean
          compile
          run-app

          I am not aware that these steps are necessary as run-app executes compilation and packaging. However it seems either grails or the STS plugins left the app in a state where it believed the webapp was up to date. I am unable to reproduce the original error, so please close this issue (and the accidental duplicate 8519)

          Thanks

          Show
          Tim Goodchild added a comment - It's a good question. Yes it had also failed on the command line. Today I went back and retried; it still failed. But then I ran the following commands on the command line and it now works clean compile run-app I am not aware that these steps are necessary as run-app executes compilation and packaging. However it seems either grails or the STS plugins left the app in a state where it believed the webapp was up to date. I am unable to reproduce the original error, so please close this issue (and the accidental duplicate 8519) Thanks
          Hide
          Tim Goodchild added a comment -

          Do you know if the STS plugins need to be updated for Grails 2.0?

          Thanks

          Show
          Tim Goodchild added a comment - Do you know if the STS plugins need to be updated for Grails 2.0? Thanks
          Hide
          Jeff Scott Brown added a comment -

          Tim,

          The error message is surprising. I don't think that Grails should ever be looking for anything under the grails-resources directory unless your GRAILS_HOME is set to a development workspace where you have the Grails source code checked out and built.

          Show
          Jeff Scott Brown added a comment - Tim, The error message is surprising. I don't think that Grails should ever be looking for anything under the grails-resources directory unless your GRAILS_HOME is set to a development workspace where you have the Grails source code checked out and built.
          Hide
          Tim Goodchild added a comment -

          Jeff,

          Yes I also found the path a little strange but I don't know enough about the internal workings of Grails; perhaps this points to another bug.
          GRAILS_HOME is set to D:\Java\grails-2.0.0 and there is only Grails in that folder.

          Show
          Tim Goodchild added a comment - Jeff, Yes I also found the path a little strange but I don't know enough about the internal workings of Grails; perhaps this points to another bug. GRAILS_HOME is set to D:\Java\grails-2.0.0 and there is only Grails in that folder.
          Hide
          Tim Goodchild added a comment -

          to clarify, I don't have the grails source code checked out and built in that folder, just the binary download

          Show
          Tim Goodchild added a comment - to clarify, I don't have the grails source code checked out and built in that folder, just the binary download

            People

            • Assignee:
              Unassigned
              Reporter:
              Tim Goodchild
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Last Reviewed:

                Development