Announcement Announcement Module
Collapse
No announcement yet.
Problem upgrading app from 2.2.1 to 2.2.3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem upgrading app from 2.2.1 to 2.2.3

    After having upgraded GGTS to 3.3.0, I tried to upgrade an app from 2.2.1 to 2.2.3. When trying to run-app, I get the following:

    Error starting Grails: nulljava.lang.ExceptionInInitializerError
    at org.codehaus.groovy.runtime.InvokerHelper.<clinit> (InvokerHelper.java:62)
    at groovy.lang.GroovyObjectSupport.<init>(GroovyObjec tSupport.java:32)
    at groovy.lang.Closure.<init>(Closure.java:221)
    at groovy.lang.Closure.<init>(Closure.java:238)
    at groovy.lang.Closure$1.<init>(Closure.java:205)
    at groovy.lang.Closure.<clinit>(Closure.java:205)
    at org.codehaus.groovy.grails.cli.GrailsScriptRunner. <clinit>(GrailsScriptRunner.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springsource.loaded.ri.ReflectiveInterceptor.j lrMethodInvoke(ReflectiveInterceptor.java:1259)
    at org.codehaus.groovy.grails.cli.support.GrailsStart er.rootLoader(GrailsStarter.java:234)
    at org.codehaus.groovy.grails.cli.support.GrailsStart er.main(GrailsStarter.java:262)
    Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.0.7 and you are trying to load version 2.0.8
    at org.codehaus.groovy.runtime.metaclass.MetaClassReg istryImpl.registerExtensionModuleFromProperties(Me taClassRegistryImpl.java:186)
    at org.codehaus.groovy.runtime.metaclass.MetaClassReg istryImpl.registerExtensionModuleFromMetaInf(MetaC lassRegistryImpl.java:174)
    at org.codehaus.groovy.runtime.metaclass.MetaClassReg istryImpl.registerClasspathModules(MetaClassRegist ryImpl.java:156)
    at org.codehaus.groovy.runtime.metaclass.MetaClassReg istryImpl.<init>(MetaClassRegistryImpl.java:111)
    at org.codehaus.groovy.runtime.metaclass.MetaClassReg istryImpl.<init>(MetaClassRegistryImpl.java:73)
    at groovy.lang.GroovySystem.<clinit>(GroovySystem.jav a:33)
    ... 14 more



    2.0.8 is not an option for the Groovy compiler setting. Does this mean I need to do a fresh install of 3.3.0 ?

  • #2
    This error refers to the runtime, not the compile time classpath. It must be the case that you have 2 groovy jars on your classpath. Perhaps you have the Groovy classpath container on it as well as the groovy jar from Grails. The 2.0.7 jar should be removed.

    Comment


    • #3
      I have finally been able to get back to this and retry and I am still getting the same error. I have looked for a Groovy 2.0.7 jar to no avail. It does not show up in the Grails Dependencies container, only the 2.0.8 jar. There is no reference to it in .classpath. It does not show up in the dependency report.

      run-app and test-app both work fine from the command line. test-app shows the same problem running from GGTS. GGTS and GRAILS_HOME both are using the same physical install of 2.2.3.



      GGTS is an upgrade, originally from 3.1.0. I have other older Grails projects in the same workspace, but those projects are not open.

      So where else could 2.0.7 be coming from ?

      Comment


      • #4
        It's likely that the 2.0.7 jar is coming from a Groovy Classpath container. Can you attach the .classpath for this project and I can see?

        Comment


        • #5
          I managed to get it working this morning though my head is still spinning. ;=}

          I have been working with my master git branch on 2.2.1 and a local branch with 2.2.3. I was working on master and checked out 2.2.3. It seems safest to close the project in Eclipse and work outside of Eclipse for this as simply refreshing the project is not enough to get it to recognize what's going on with the project.

          The key to getting it working though seems to be to manually delete the run-app launcher so it gets recreated. Oddly enough, when I inspected the Run Configuration and looked on the Source tab prior to doing this, I saw the the source for 2.2.3 yet when it actually launched it seemed to be using a different classpath container (with 2.0.7) than the one specified and showing as the project's classpath container which has 2.0.8.

          It seems to me that the actions behind these launchers should check to see if the correct classpath container is loaded and reload the one specified by the project before execution if necessary, if this is possible.


          BTW, the quick timeout on this forum is highly obnoxious. I couldn't get my whole response entered without data loss and having to reenter at least part of it.

          Comment


          • #6
            Another user recently had issues with stale data in launch configurations. This sounds similar to yours.

            Arguably you are right and this should be cleared automatically when a project's grails version has been changed. So I'd say this is a bug.
            Bug report raised: https://issuetracker.springsource.com/browse/STS-3501

            Kris

            Comment


            • #7
              Thanks for the help. Hopefully it saves somebody else some time.

              Comment

              Working...
              X