spring-loaded
spring-loaded copied to clipboard
IllegalArgumentException in SpringPlugin with 1.2.1.BUILD-SNAPSHOT
seeing stacktraces like the onw below (currently with springloaded-1.2.1.BUILD-20140606.193800-13):
java.lang.IllegalArgumentException: Can not set final java.util.Map field org.springframework.core.LocalVariableTableParameterNameDiscoverer.parameterNamesCache to org.springframework.core.LocalVariableTableParameterNameDiscoverer
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:20)
at java.lang.reflect.Field.get(Field.java:358)
at org.springsource.loaded.agent.SpringPlugin.clearLocalVariableTableParameterNameDiscovererCache(SpringPlugin.java:177)
at org.springsource.loaded.agent.SpringPlugin.reloadEvent(SpringPlugin.java:152)
at org.springsource.loaded.TypeRegistry.fireReloadEvent(TypeRegistry.java:1794)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:417)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:845)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:51)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:235)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:219)
at java.lang.Thread.run(Thread.java:662)
thanks, zyro
Hitting this too with springloaded-1.2.1.RELEASE
I encountered the same issue too. Manage to resolve that by using older version: springloaded-1.1.5.BUILD-20140219.195134-2.jar. Hope this help!!
For those of you wondering how to apply @jiajiunnwong's suggestion to a Grails project, just set GRAILS_OPTS
environment variable so that it overrides the version of springloaded as follows.
GRAILS_OPTS="-javaagent:/path/to/springloaded-1.1.5.RELEASE.jar" grails -reloading -https run-app
On a side note, I still don't understand why this exception gets thrown in the first place.
I also observe this bug with springloaded 1.2.3.RELEASE. Will it be fixed?
still got the issue with springloaded-1.2.4.RELEASE
I put in a guard to catch this and the exception is simply logged. Whether it is a real issue or 'harmless' would be determined by checking if your request mappings are being reloaded properly. if it isn't working having a simple test case that shows the problem would be really helpful. Initially just knowing the version of Spring would help as the Spring plugin may just be out of step with the version in use here. If you are happy with jumping back to an old version of spring loaded then I guess this is harmless for you since that old version won't be tidying up the request mapping state either.
Hi, I have the same problem with spring version 4.1.4.RELEASE and both with springloaded-1.2.3.RELEASE, and springloaded-1.2.4.RELEASE
+1
I am also getting this error with the latest springloaded 1.24
+1 me too for spring-loaded 1.2.4
With ver. 1.2.5.RELEASE, same problem with a different error log, and the changed class is still unusable:
Feb 05, 2016 11:34:12 AM org.springsource.loaded.agent.SpringPlugin clearLocalVariableTableParameterNameDiscovererCache
SEVERE: Unexpected IllegalArgumentException trying to access parameterNamesCache field on LocalVariableTableParameterNameDiscoverer class