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

"Context failed to load: null" error with command grails run-script in grails 5.3.6 #13821

Open
joelBrun opened this issue Nov 2, 2024 · 1 comment

Comments

@joelBrun
Copy link

joelBrun commented Nov 2, 2024

Expected Behavior

script success with message :

hello app536 !

Actual Behaviour

Script fails with message :

Task :runScript
Grails application running at http://localhost:0 in environment: development
Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException
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.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.UnsupportedOperationException
at org.codehaus.groovy.control.CompilerConfiguration$1.addCompilationCustomizers(CompilerConfiguration.java:195)
at grails.ui.script.GrailsApplicationScriptRunner.run(GrailsApplicationScriptRunner.groovy:61)
at grails.ui.script.GrailsApplicationScriptRunner.main(GrailsApplicationScriptRunner.groovy:122)
... 5 more
Context failed to load: null

Task :runScript FAILED

Steps To Reproduce

grails create-app app536
cd app536
mkdir scripts
echo 'println "hello app536 !"' > scripts/hello.groovy
./gradlew runScript -Pargs="scripts/hello.groovy"

Environment Information

Operating System: WSL2 Ubuntu 24
Grails Version: 5.3.6
JVM Version: 1.8.0_362

Example Application

No response

Version

5.3.6

@joelBrun joelBrun changed the title Error running command run-script in grails 5.3.6 "Context failed to load: null" error with command grails run-script in grails 5.3.6 Nov 3, 2024
@jeffscottbrown
Copy link
Member

Not a dup but related to #12953.

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