Grails 2.4.0 legacy app throwing java.lang.reflect.InvocationTargetException

懵懂的女人 提交于 2020-06-29 05:12:50

问题


Since I have Java 1.8 in my local setup and need 1.7 for Grails, I installed jEnv.

When I run grails command via jenv on my Grails project directory, I get this error -

sandeepan.nath$ jenv exec grails

objc[31865]: Class JavaLaunchHelper is implemented in both /Users/sandeepan.nath/.jenv/versions/1.7.0.80/bin/java (0x1003b74c0) and /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1004724e0). One of the two will be used. Which one is undefined.
| Loading Grails 2.0.4
| Error java.lang.reflect.InvocationTargetException
| Error    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error    at java.lang.reflect.Method.invoke(Method.java:606)
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
| Error    at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error    at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error Caused by: groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigSlurper$_parse_closure5.legacyResolve() is applicable for argument types: (java.lang.Boolean) values: [false]
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
| Error    at BuildConfig$_run_closure1.doCall(BuildConfig.groovy:33)
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
| Error    at BuildConfig$_run_closure1.doCall(BuildConfig.groovy)
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
| Error    at grails.util.BuildSettings.configureDependencyManager(BuildSettings.groovy:1212)
| Error    at grails.util.BuildSettings$configureDependencyManager.callCurrent(Unknown Source)
| Error    at grails.util.BuildSettings.postLoadConfig(BuildSettings.groovy:1102)
| Error    at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:999)
| Error    at grails.util.BuildSettings$loadConfig$0.callCurrent(Unknown Source)
| Error    at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:982)
| Error    at grails.util.BuildSettings$loadConfig.callCurrent(Unknown Source)
| Error    at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:959)
| Error    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)

This exception does not clearly say what is the issue. I am able to create a fresh grails application though. No issue with that.

来源:https://stackoverflow.com/questions/62320885/grails-2-4-0-legacy-app-throwing-java-lang-reflect-invocationtargetexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!