Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 3.2.11 is incompatible (will not run) with GORM 6.1.3.RELEASE #10693

Closed
danduke opened this issue Jun 27, 2017 · 8 comments
Closed

Grails 3.2.11 is incompatible (will not run) with GORM 6.1.3.RELEASE #10693

danduke opened this issue Jun 27, 2017 · 8 comments

Comments

@danduke
Copy link

danduke commented Jun 27, 2017

Steps to Reproduce

  • Create simple application with a single domain class, using 3.2.11
  • Start, just to make sure that worked. (It should have.)
  • Change gormVersion in gradle.properties to 6.1.3.RELEASE (because this is needed for ehcache plugin, in your real application that you're trying to upgrade)
  • Try to start application. See a stack trace when your application fails to start.
Caused by: groovy.lang.MissingMethodException: No signature of method: static org.grails.datastore.mapping.dirty.checking.DirtyCheckable.$static$init$org_grails_datastore_mapping_dirty_checking_DirtyCheckable__DIRTY_CLASS_MARKER() is applicable for argument types: (java.lang.Class) values: [class simple2.Thing]
        at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1501)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1487)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:899)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
        at org.grails.datastore.mapping.dirty.checking.DirtyCheckable$Trait$Helper.$static_methodMissing(DirtyCheckable.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1499)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1487)
        at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:65)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:206)

I can upload an application if anybody wants (just comment back here) but really, it's just create-app, create-domain-class, change one line, and fail.

Expected Behaviour

Application should start.

Actual Behaviour

Application does not start.

Environment Information

  • Operating System: OS X
  • Grails Version: 3.2.11
  • JDK Version: 1.8.0_65
@kdpeders
Copy link

This was working in previous versions of Grails (e.g 3.2.8).

@danduke
Copy link
Author

danduke commented Jun 27, 2017

Confirmed just now it was working as recently as 3.2.10.

@graemerocher
Copy link
Member

The solution is to upgrade to GORM 6.1.5 or alternatively downgrade the Groovy version to 2.4.10

This is a difference in Groovy 2.4.11 and above that we cannot resolve unfortunately

@danduke
Copy link
Author

danduke commented Jun 28, 2017

Upgrading to GORM 6.1.5 isn't bad, so good to know that is an option. I wasn't actually even aware that it was released.

However, per https://stackoverflow.com/questions/44635366/is-it-possible-to-have-different-gorm-versions-in-plugins-within-a-grails-3-appl (linked from: grails-plugins/grails-cache-ehcache#25) this will require upgrading every plugin that uses GORM 6.1.3 (and that provides domain objects) to 6.1.5. Even that isn't bad, for plugins that we control. For third party plugins...it's an ongoing challenge.

I would greatly appreciate any insight you have on that issue!

@graemerocher
Copy link
Member

The issue is a binary incompatibility running Groovy code compiled with an older version of Groovy with Groovy version newer than 2.4.11

There really is nothing we can do about it per se. You could report the issue to the Groovy team https://issues.apache.org/jira/projects/GROOVY

And see if a new 2.4.x release of Groovy can improve backwards binary compatibility.

@danduke
Copy link
Author

danduke commented Jun 28, 2017

Well, while asking third party plugin owners to upgrade to a newer gorm version isn't the best thing on my to-do list, there aren't all that many (that we use) that provide domain objects at least! And it's good to know that maybe as things calm down on the groovy upgrades this will be less of an issue in the future.

Thanks for the quick responses! I'll see if I can narrow this down to something I can report to the Groovy team, but regardless, I'm closing this issue as your suggested fix (upgrade to 6.1.5) is clearly working.

For anyone else who stumbles across this, and wonders: I also confirmed that gorm 6.1.5 works fine with grails 3.2.10. I have not tested with older versions than that, but figured it would be good to confirm some backwards compatibility there, in case we can't get everything upgraded right away.

Thanks again, Graeme!

@erichmx
Copy link

erichmx commented Jul 27, 2017

@graemerocher looks like there is no MongoDB GORM for 6.1.5 :(

I guess my only option is to "downgrade the Groovy version to 2.4.10", do I have to do it at compile time? I mean recompiling grails-core. Or can it be done at runtime? I have tried exporting CI_GROOVY_VERSION and setting ext.groovyVersion in my build.gradle and also in my setting.gradle without success, so I'm guessing I will have to recompile grails-core.

@akusuma2026
Copy link

I'm also facing similar issue
gradle.properties
grailsVersion=3.3.2
gormVersion=6.1.8.RELEASE
gradleWrapperVersion=3.5

groovy -version
Groovy Version: 2.4.13 JVM: 1.8.0_131 Vendor: Oracle Corporation OS: Mac OS X

logs:
groovy.lang.MissingMethodException: No signature of method: org.grails.plugins.web.taglib.ValidationTagLib.messageImpl() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [Congratulations! The order was accepted!]
Possible solutions: messageImpl(java.util.Map), message(), message(groovy.lang.Closure), message(java.util.Map)
at grails.artefact.gsp.TagLibraryInvoker$Trait$Helper.methodMissing(TagLibraryInvoker.groovy:92)
at grails.artefact.gsp.TagLibraryInvoker$Trait$Helper$methodMissing$1.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at org.grails.plugins.web.taglib.ValidationTagLib.methodMissing(ValidationTagLib.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:939)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1262)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)
at org.grails.plugins.web.taglib.ValidationTagLib.invokeMethod(ValidationTagLib.groovy)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:430)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:369)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at org.grails.plugins.web.taglib.ValidationTagLib$_closure6.doCall(ValidationTagLib.groovy:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1252)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)
at org.grails.plugins.web.taglib.ValidationTagLib.invokeMethod(ValidationTagLib.groovy)
at grails.artefact.gsp.TagLibraryInvoker$Trait$Helper.methodMissing(TagLibraryInvoker.groovy:88)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants