Michael
Michael

Reputation: 33307

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.

Upvotes: 4

Views: 2349

Answers (1)

Andy Clement
Andy Clement

Reputation: 2560

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.

Upvotes: 9

Related Questions