Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails 2.2.2 Compilation Errors: ThreadGroupContext beaninfo

I am using Grails 2.2.2 with GGTS 3.3M1. When I run my app (grails run-app) and change something in a groovy file then Grails recompiles the file. During this process the following error output occurs:

 | Error Unexpected problem clearing ThreadGroupContext beaninfo: 
 | Error java.lang.ClassCastException: java.beans.WeakIdentityMap cannot be cast to java.util.Map
 | Error    at org.springsource.loaded.agent.JVMPlugin.reloadEvent(JVMPlugin.java:77)
 | Error    at org.springsource.loaded.TypeRegistry.fireReloadEvent(TypeRegistry.java:1594)
 | Error    at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:396)
 | Error    at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:805)
 | Error    at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:51)
 | Error    at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:218)
 | Error    at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:205)
 | Error    at java.lang.Thread.run(Thread.java:722)
 Reloading: JVMPlugin: warning: unable to clear BEANINFO_CACHE, cant find field

The compilation seems to work fine but the error still occurs.

like image 544
confile Avatar asked Jan 13 '23 12:01

confile


1 Answers

This is because you are on JDK 1.7 update 21. Something 'moved' in the JDK at that version and the state clearing logic needs updating in springloaded. This is already fixed in the springloaded codebase but won't be in a new grails version for a little while. Older versions of JDK 1.7 would be fine. You can ignore the message, but it means some state was not cleared when a type was reloaded - and this means it may look like it hasn't reloaded some of the changes you might make to your types.

like image 192
Andy Clement Avatar answered May 06 '23 04:05

Andy Clement