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

Reloading after Controller code change suffers"IllegalStateException: Illegal access" #289

Open
transentia opened this issue Dec 14, 2021 · 0 comments

Comments

@transentia
Copy link

Pipeline 3.3.6/Grails 5.0.2/Java 16.0.2

I'm not sure whether this is a pipeline or Grails or tomcat or... issue, but here goes anyway...

If I change a controller trivially (edit a log.debug string, for example..any trivial change), I get the following in my logs after grails goes through its devtools-driven auto redeploy (see below for excerpt with logging at debug level):

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.lang.BooleanCustomizer]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

I'm raising it here 'cos it appears to happen in the middle of pipeline processing, but I acknowledge that this may not be a 'real' thing...

Its INFO level, not ERROR/WARN so it may not be important. But just in case...

19:51:58.173 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: []
19:51:58.174 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\bootstrap-2.3.2]
19:51:58.174 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\browserdetect]
19:51:58.174 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\chosen_v1.8.7]
19:51:58.175 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\images]
19:51:58.175 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\javascripts]
19:51:58.175  INFO --- [      Thread-10] o.a.c.loader.WebappClassLoaderBase       : Illegal access: this web application instance has been stopped already. Could not load [java.lang.BooleanBeanInfo]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.lang.BooleanBeanInfo]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1427)
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1415)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:837)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.findClassIgnoringNotFound(TomcatEmbeddedWebappClassLoader.java:123)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.doLoadClass(TomcatEmbeddedWebappClassLoader.java:88)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:466)
	at java.desktop/com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:67)
	at java.desktop/com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:110)
	at java.desktop/com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:94)
	at java.desktop/com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66)
	at java.desktop/com.sun.beans.finder.BeanInfoFinder.find(BeanInfoFinder.java:41)
	at java.desktop/java.beans.Introspector.findExplicitBeanInfo(Introspector.java:467)
	at java.desktop/java.beans.Introspector.<init>(Introspector.java:417)
	at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:195)
	at groovy.lang.MetaClassImpl.lambda$addProperties$8(MetaClassImpl.java:3429)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
	at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3429)
	at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3411)
	at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3404)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:325)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:262)
	at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:983)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:1016)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1008)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.compareToWithEqualityCheck(DefaultTypeTransformation.java:593)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.compareEqual(DefaultTypeTransformation.java:617)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.compareEqual(ScriptBytecodeAdapter.java:708)
	at asset.pipeline.CachePersister.run(CachePersister.groovy:19)

19:51:58.175 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\jquery-2.2.4]
19:51:58.176 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\jquery.fileDownload]
19:51:58.176  INFO --- [      Thread-10] o.a.c.loader.WebappClassLoaderBase       : Illegal access: this web application instance has been stopped already. Could not load [java.lang.BooleanCustomizer]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.lang.BooleanCustomizer]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1427)
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1415)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:837)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.findClassIgnoringNotFound(TomcatEmbeddedWebappClassLoader.java:123)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.doLoadClass(TomcatEmbeddedWebappClassLoader.java:88)
	at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:70)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:466)
	at java.desktop/com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:67)
	at java.desktop/com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:110)
	at java.desktop/java.beans.Introspector.findCustomizerClass(Introspector.java:1125)
	at java.desktop/java.beans.Introspector.getTargetBeanDescriptor(Introspector.java:1119)
	at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:444)
	at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:195)
	at groovy.lang.MetaClassImpl.lambda$addProperties$8(MetaClassImpl.java:3429)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
	at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3429)
	at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3411)
	at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3404)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:325)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:262)
	at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:983)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:1016)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1008)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.compareToWithEqualityCheck(DefaultTypeTransformation.java:593)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.compareEqual(DefaultTypeTransformation.java:617)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.compareEqual(ScriptBytecodeAdapter.java:708)
	at asset.pipeline.CachePersister.run(CachePersister.groovy:19)

19:51:58.176 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: [D:\DEV\Tonic\IOS5\grails-app\assets\stylesheets]
19:51:58.176 DEBUG --- [  restartedMain] a.pipeline.fs.FileSystemAssetResolver    : Asset Pipeline FSResolver Initialized with Scan Directories: []
19:51:58.177 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 0 triggers
19:51:58.177 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 0 triggers
19:51:58.177 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 0 triggers
19:51:58.177 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 0 triggers
19:51:58.178 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 0 triggers
19:51:58.180 DEBUG --- [  restartedMain] quartz.QuartzGrailsPlugin                : Scheduling ios.HeartbeatJob with trigger GRAILS_TRIGGERS.heartbeatStartTrigger: Trigger 'GRAILS_TRIGGERS.heartbeatStartTrigger':  triggerClass: 'org.quartz.impl.triggers.SimpleTriggerImpl calendar: 'null' misfireInstruction: 0 nextFireTime: null
19:51:58.180 DEBUG --- [  restartedMain] quartz.QuartzGrailsPlugin                : Job ios.HeartbeatJob scheduled
19:51:58.180 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 1 triggers
19:51:58.181 DEBUG --- [  restartedMain] quartz.QuartzGrailsPlugin                : Scheduling ios.HeartbeatJob with trigger GRAILS_TRIGGERS.heartbeatTrigger: Trigger 'GRAILS_TRIGGERS.heartbeatTrigger':  triggerClass: 'org.quartz.impl.triggers.CronTriggerImpl calendar: 'null' misfireInstruction: 0 nextFireTime: null
19:51:58.181 DEBUG --- [  restartedMain] quartz.QuartzGrailsPlugin                : Job ios.HeartbeatJob scheduled
19:51:58.181 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 1 triggers
19:51:58.181 DEBUG --- [SchedulerThread] org.quartz.core.QuartzSchedulerThread    : batch acquisition of 1 triggers

Obviously, a full restart doesn't have any problem.

The message always references java.lang.BooleanBeanInfo .

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

1 participant