grails-core: 5.0.0.M1, 4.1.0.M3-4.1.0.M5 - Executable Jars BROKEN - Cannot get property 'config' on null object

Everything worked fine up until 4.1.0.M3. Now running an executable jar results in a GrailsTagException: Cannot get property ‘config’ on null object

This is very easy to reproduce. Just create a new web app, enable build.gradle for executable jar creation, package and run.

An example app is provided here with exact steps of how it was created: https://github.com/codeconsole/grails4bugs

You can reproduce the error as follows:

sdk use grails 4.1.0.M5
git clone https://github.com/codeconsole/grails4bugs
cd grails4bugs
grails package
./build/libs/grails4bugs-0.1.jar 

http://localhost:8080

org.grails.taglib.GrailsTagException: [views/index.gsp:44] Error executing tag <sitemesh:captureContent>: Cannot get property 'config' on null object
	at org.grails.gsp.GroovyPage.throwRootCause(GroovyPage.java:473)
	at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:415)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: Cannot get property 'config' on null object
	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
	at gsp_grails4bugs_m5index_gsp$_run_closure2$_closure4.doCall(gsp_grails4bugs_m5index_gsp.groovy:35)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at org.grails.gsp.GroovyPage.invokeTagLibClosure(GroovyPage.java:446)
	at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:364)
	... 104 common frames omitted

Note: using `grails run-app’ works. Only running the jar does not work. Executable jars broke starting in 4.1.0.M3

You can also demonstrate executable working with 4.1.0.M2:

git checkout 4.1.0.M2
grails clean
grails package	
./build/libs/grails4bugs-0.1.jar 

http://localhost:8080

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 18 (13 by maintainers)

Most upvoted comments

I am planning to look into this next week, and will try to get this fixed with 5.0.0.RC1

Thanks for the response @JasonTypesCodes. It’s is great to hear that Grails 5 is still going ahead.

The world has been a weird/horrid place recently, so I’m not surprised that “there have been a number of things that have hampered our progress on Grails 5.”

I hope everybody in the community is safe and sound.

@transentia there have been a number of things that have hampered our progress on Grails 5. None of which were related to the remaining technical work (which at this point is primarily the resolution of this issue). I’d prefer not to enumerate things here, but returning to Grails 5 RC1 is our top priority after a patch release of Grails 3 that addresses the HTTPS Redirect Issue in the Grails Wrapper.

Is there anything that I (or @codeconsole or…anyone else) can do to help speed things along?

Finding, reporting, and providing details around this issue is already a massive help. Thank you so much for that. The next steps are identifying and applying fix for this issue, so any further details or fixes you are able to provide on that front are certainly welcome.

And then, of course, once RC1 has been released verifying the candidate against your use cases is very helpful towards the Grails 5 GA release.