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

Not able to run the app using Gretty 4.0.3 in combination with JDK17 and Gradle 7.5.1. #273

Open
nalim1989 opened this issue Oct 26, 2022 · 2 comments

Comments

@nalim1989
Copy link

I was using gretty version 3.0.3 (Jetty 9.4) together with JDK11 and Gradle 6.8. Everything worked fine.

After that, I upgraded the project to JDK17 (temurin-17.jdk) and also Gradle to 7.5.1 and gretty to 4.0.3.

I'm trying to run the app using ./gradlew jettyRun but I'm getting the following exception:

Environment config has been changed to 'local'.
Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: org.akhikhl.gretty.Runner.run() is applicable for argument types: () values: []
Possible solutions: any(), dump(), find(), grep(), grep(java.lang.Object), use([Ljava.lang.Object;)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:50)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
        at org.akhikhl.gretty.Runner.main(Runner.groovy:51)
Exception in thread "Thread-4205" org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:415)
        at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:52)
        at org.gradle.process.internal.DefaultExecActionFactory.javaexec(DefaultExecActionFactory.java:195)
        at org.gradle.api.internal.project.DefaultProject.javaexec(DefaultProject.java:1161)
        at org.gradle.api.internal.project.DefaultProject.javaexec(DefaultProject.java:1156)
        at org.gradle.api.Project$javaexec$8.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
        at org.akhikhl.gretty.DefaultLauncher.javaExec(DefaultLauncher.groovy:99)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
        at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall(LauncherBase.groovy:197)
        at org.akhikhl.gretty.LauncherBase$_launchThread_closure3.doCall(LauncherBase.groovy)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
        at groovy.lang.Closure.call(Closure.java:412)
        at groovy.lang.Closure.call(Closure.java:406)
        at groovy.lang.Closure.run(Closure.java:493)
        at java.base/java.lang.Thread.run(Thread.java:833)

I've tried with the tomcatRun too, but the same problem occurred.
Does gretty plugin support JDK17 at all?

@boris-petrov
Copy link
Member

I am using Gretty 3.0.9 with JDK 18 and 19 on Gradle 7.5.1 so yes, it does work. I'm not sure what you're hitting. @f4lco any ideas?

@nalim1989
Copy link
Author

I've downgraded gretty according to your advice to 3.0.9. and switched from jetty11 to jetty9.4 and now everything works well with JDK17!

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

2 participants