I am using Grails 2.3.8
When I change a method's name in a service class, and try to invoke it I get an error similar to this:
org.springsource.loaded.ReloadException: ReloadableType.determineDispatcher(): expected com.SomeService$$EnhancerBySpringCGLIB$$a85275cb to be reloadable
Now I guess this is because the actual service class is being wrapped in spring's "enhancer" and this somehow makes it unreloadable, but I'm not exactly sure why, and I have not found any information concerning this.
Is there a workaround for this, or do I have to restart the application whenever I change a method's name ?
To fix the reloadable warnings in grails console, follow these steps:
Edit grails-2.3.7/bin/startGrails file, search for AGENT_STRING and change the AGENT_STRING to point to it rather than the 1.1.5 included in the distribution. It should look like this:
set AGENT_STRING=-javaagent:"%GRAILS_HOME:\=/%/lib/org.springframework/springloaded/jars/springloaded-1.2.0.RELEASE.jar" -noverify -Dspringloaded=\"%SPRINGLOADED_PARAMS%\"
restart grails