Grails
  1. Grails
  2. GRAILS-9118

run-app fails with "No such property: org for class: _GrailsRun_groovy"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1-RC1
    • Fix Version/s: 2.1-RC2
    • Component/s: None
    • Labels:
      None
    • Environment:
      java 1.6

      Description

      When i run the run-app script (both with existing and new grails project), i get:

      | Server running. Browse to http://localhost:8080/...
      | Error Error executing script RunApp: No such property: org for class: _GrailsRun_groovy (Use --stacktrace to see the full trace)
      

      Extra info from --stacktrace:

      groovy.lang.MissingPropertyException: No such property: org for class: _GrailsRun_groovy
      	at _GrailsRun_groovy$_run_closure9.doCall(_GrailsRun_groovy:243)
      

        Issue Links

          Activity

          Hide
          Jeff Scott Brown added a comment - - edited

          Peter,

          Can you run "grails refresh-dependencies"? Once you have done that if that yields any errors please report those here. If that appears to work, then "grails list-plugins" and verify that tomcat 2.1.0.RC1 shows up at the bottom of the output which includes the list of plugins which are installed in this app.

          The line of code in question is referring to org.grails.plugins.tomcat.TomcatKillSwitch so the problem is likely related to the tomcat plugin.

          Thanks for your help.

          Show
          Jeff Scott Brown added a comment - - edited Peter, Can you run "grails refresh-dependencies"? Once you have done that if that yields any errors please report those here. If that appears to work, then "grails list-plugins" and verify that tomcat 2.1.0.RC1 shows up at the bottom of the output which includes the list of plugins which are installed in this app. The line of code in question is referring to org.grails.plugins.tomcat.TomcatKillSwitch so the problem is likely related to the tomcat plugin. Thanks for your help.
          Hide
          Jeff Scott Brown added a comment -

          Peter,

          Actually, providing the feedback that I requested above will not help. We have a beed on this and are working to fix it now.

          Thanks again.

          Show
          Jeff Scott Brown added a comment - Peter, Actually, providing the feedback that I requested above will not help. We have a beed on this and are working to fix it now. Thanks again.
          Hide
          Graeme Rocher added a comment -

          How is it possible that this got through our functional test suite? There must be some other explanation

          Show
          Graeme Rocher added a comment - How is it possible that this got through our functional test suite? There must be some other explanation
          Hide
          Graeme Rocher added a comment -

          Declaring

          dependencies {
             build "org.grails:grails-plugin-tomcat:$grailsVersion"
          }
          

          In your BuildConfig.groovy works around the problem. I'm still trying to understand why all of our functional test suites are passing and why this doesn't happen with 2.1 BUILD-SNAPSHOT

          Show
          Graeme Rocher added a comment - Declaring dependencies { build "org.grails:grails-plugin-tomcat:$grailsVersion" } In your BuildConfig.groovy works around the problem. I'm still trying to understand why all of our functional test suites are passing and why this doesn't happen with 2.1 BUILD-SNAPSHOT
          Hide
          Graeme Rocher added a comment -

          For some reason, when the script is compiled the grails-plugin-tomcat jar is not yet on the classpath, the reason for this I'm still trying to understand. Also trying to understand why it doesn't fail on our functional test suite

          Show
          Graeme Rocher added a comment - For some reason, when the script is compiled the grails-plugin-tomcat jar is not yet on the classpath, the reason for this I'm still trying to understand. Also trying to understand why it doesn't fail on our functional test suite
          Hide
          Peter Doornbosch added a comment -

          I'm sorry to say, but adding the build dependency doesn't help...
          When i list-plugins, the tomcat plugin is there:

          tomcat              2.1.0.RC1        --  Apache Tomcat plugin for Grails
          
          Show
          Peter Doornbosch added a comment - I'm sorry to say, but adding the build dependency doesn't help... When i list-plugins, the tomcat plugin is there: tomcat 2.1.0.RC1 -- Apache Tomcat plugin for Grails
          Hide
          Graeme Rocher added a comment -

          @Peter - you need to remove your project work directory for it to work. Example:

          rm -rf ~/.grails/2.1.0.RC1/projects/runtest

          Or set grails.project.work.dir="target/work" in BuildConfig

          Show
          Graeme Rocher added a comment - @Peter - you need to remove your project work directory for it to work. Example: rm -rf ~/.grails/2.1.0.RC1/projects/runtest Or set grails.project.work.dir="target/work" in BuildConfig
          Hide
          Lari Hotari added a comment -

          Graeme, it got through the functional test suite because of this:
          https://github.com/grails/grails-functional-tests/commit/246b642bde79b56176319a40dc66c5f8dddd9406#L1R145
          "grails compile" gets executed first. It was a workaround for GRAILS-8189. Also for GRAILS-8969 .

          Show
          Lari Hotari added a comment - Graeme, it got through the functional test suite because of this: https://github.com/grails/grails-functional-tests/commit/246b642bde79b56176319a40dc66c5f8dddd9406#L1R145 "grails compile" gets executed first. It was a workaround for GRAILS-8189 . Also for GRAILS-8969 .
          Hide
          Peter Doornbosch added a comment -

          @Graeme: you're right, that works.

          Show
          Peter Doornbosch added a comment - @Graeme: you're right, that works.

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Peter Doornbosch
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development