title: java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira - Grails 2.4.2
body: <p>I have encountered with runtime error:</p>
  
  <blockquote>
    <p>java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira.</p>
  </blockquote>
  
  <p>Stacktrace as follow:</p>
  
  <pre><code>"C:\Program Files (x86)\Java\jdk1.7.0\bin\java" -Dgrails.home=D:\ranjit\grails-2.4.2\grails-2.4.2 "-Dbase.dir=E:\projects\Nepal Rastriya Bank\nrb 03 29" "-Dtools.jar=C:\Program Files (x86)\Java\jdk1.7.0\lib\tools.jar" -Dgroovy.starter.conf=D:\ranjit\grails-2.4.2\grails-2.4.2/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -javaagent:D:\ranjit\grails-2.4.2\grails-2.4.2\lib\org.springframework\springloaded\jars\springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded=profile=grails -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\bin" -Dfile.encoding=UTF-8 -classpath "D:\ranjit\grails-2.4.2\grails-2.4.2\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.3.3.jar;D:\ranjit\grails-2.4.2\grails-2.4.2\dist\grails-bootstrap-2.4.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf D:\ranjit\grails-2.4.2\grails-2.4.2/conf/groovy-starter.conf "run-app -plain-output"
  |Loading Grails 2.4.2
  |Configuring classpath
  .
  |Environment set to development
  .................................
  |Packaging Grails application
  .................................................
  |Running Grails application
  Error |
  java.lang.RuntimeException: Reloading agent exited via exception, please     raise a jira
  Error |
      at   org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPrePr ocessorAgentAdapter.java:104)
  Error |
      at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
  Error |
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
  Error |
      at java.lang.ClassLoader.defineClass1(Native Method)
  Error |
      at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
  Error |
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  Error |
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
  Error |
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
  Error |
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
  Error |
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  Error |
      at java.security.AccessController.doPrivileged(Native Method)
  Error |
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  Error |
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  Error |
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
  Error |
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
  Error |
      at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
  Error |
      at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
  Error |
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
  Error |
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
  Error |
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:753)
  Error |
      at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.&lt;init&gt;(DefaultGrailsApplication.java:121)
  Error |
      at org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationFactoryBean.java:99)
  Error |
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
  Error |
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
  Error |
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
  Error |
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
  Error |
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
  Error |
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
  Error |
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
  Error |
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
  Error |
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
  Error |
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
  Error |
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
  Error |
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
  Error |
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  Error |
      at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:71)
  Error |
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
  Error |
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
  Error |
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
  Error |
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  Error |
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  Error |
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  Error |
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  Error |
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  Error |
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  Error |
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  Error |
      at java.lang.Thread.run(Thread.java:722)
  Error |
     Caused by: java.lang.RuntimeException: Method code too large!
  Error |
      at sl.org.objectweb.asm.MethodWriter.a(Unknown Source)
  Error |
      at sl.org.objectweb.asm.ClassWriter.toByteArray(Unknown Source)
  Error |
      at org.springsource.loaded.ReloadableType$MergedRewrite$ChainedAdapters.getBytes(ReloadableType.java:872)
  Error |
      at org.springsource.loaded.ReloadableType$MergedRewrite.rewrite(ReloadableType.java:852)
  Error |
      at org.springsource.loaded.ReloadableType.rewriteCallSitesAndDefine(ReloadableType.java:825)
  Error |
      at org.springsource.loaded.ReloadableType.&lt;init&gt;(ReloadableType.java:155)
  Error |
      at org.springsource.loaded.TypeRegistry.addType(TypeRegistry.java:926)
  Error |
      at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:298)
  Error |
      at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
  Error |
      ... 46 more
  Configuring Spring Security Core ...
  ... finished configuring Spring Security Core
  Configuring Spring Security UI ...
  ... finished configuring Spring Security UI
  abc
  |Server running. Browse to http://localhost:8080/xyz
  </code></pre>
  
  <p>I have already tried options like clean or clean-all or deleting /target or cloning a fresh project from repo, but none of these options were helpful to solve the problem.</p>
  
  <p>I also tried <a href="https://stackoverflow.com/questions/34872650/grails-2-4-0-java-lang-runtimeexception-reloading-agent-exited-via-exception">this question</a>, but that also did not help.</p>