title: javaagent error in tomcat
body: <p>Error:</p>
  
  <pre><code> SEVERE: Exception sending context initialized event to listener instance 
   of class org.springframework.web.context.ContextLoaderListener
  
   org.springframework.beans.factory.BeanCreationException: Error creating 
   bean with name 
   'org.springframework.context.weaving.AspectJWeavingEnabler#0': 
   Initialization of bean failed; nested exception is 
   org.springframework.beans.factory.BeanCreationException: Error creating 
   bean with name 'loadTimeWeaver': Initialization of bean failed; nested  
   \exception is java.lang.IllegalStateException: ClassLoader  
   [org.apache.catalina.loader.WebappClassLoader] does NOT provide an 
   'addTransformer(ClassFileTransformer)' method. Specify a custom 
   LoadTimeWeaver or start your Java virtual machine with Spring's agent: 
   -javaagent:spring-agent.jar
  </code></pre>
  
  <p>But I have javaagent in my tomcat VM arguments</p>
  
  <pre><code> -Dext.prop.dir="/home/gopi/Desktop/REST_CONFIG" -javaagent:/home/gopi/.m2
   /repository/org/springframework/spring-agent/2.5.6/spring-agent-
   2.5.6.jar -Dcatalina.base="/opt/apache-tomcat-7.0.62" 
   -Dcatalina.home="/opt/apache-tomcat-7.0.62" -Dwtp.deploy="/opt/apache-
    tomcat-7.0.62/wtpwebapps" -Djava.endorsed.dirs="/opt/apache-tomcat-
    7.0.62/endorsed"
  </code></pre>
  
  <p><code>-Dext.prop.dir and -javaagent</code> added by me and remaining are by default.. How do i solve this issue? Any ideas?</p>