title: IllegalArgumentException at org.springframework.asm.ClassReader when initializing Spring context
body: <p>Can anyone please guide me with the possible reason for the below mentioned error, being encountered while trying to execute the java spring program. The error is as follows...</p>
  
  <pre><code>Aug 20, 2014 4:43:54 PM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre8/bin/client;C:/Program Files (x86)/Java/jre8/bin;C:/Program Files (x86)/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jre8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin\;C:\Program Files (x86)\Java\jre8;C:\Program Files (x86)\Java\jre8\lib;D:\Program Files\apache-ant-1.9.4\bin;C:\Program Files (x86)\Java\jre8\bin;D:\Softwares\Eclipse Dump\EclipseForSpring;;.
  Aug 20, 2014 4:43:54 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property.
  Aug 20, 2014 4:43:55 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Aug 20, 2014 4:43:55 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Aug 20, 2014 4:43:55 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 577 ms
  Aug 20, 2014 4:43:55 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Aug 20, 2014 4:43:55 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
  Aug 20, 2014 4:43:56 PM org.apache.catalina.core.ApplicationContext log
  INFO: No Spring WebApplicationInitializer types detected on classpath
  Aug 20, 2014 4:43:56 PM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'HelloWorld'
  Aug 20, 2014 4:43:56 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'HelloWorld': initialization started
  Aug 20, 2014 4:43:56 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'HelloWorld-servlet': startup date [Wed Aug 20 16:43:56 IST 2014]; root of context hierarchy
  Aug 20, 2014 4:43:56 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/HelloWorld-servlet.xml]
  Aug 20, 2014 4:43:57 PM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
  INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
  Aug 20, 2014 4:43:57 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  SEVERE: Context initialization failed
  java.lang.IllegalArgumentException
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
      at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
      at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
      at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:652)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:600)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:666)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:460)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  
  Aug 20, 2014 4:43:57 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  java.lang.IllegalArgumentException
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
      at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
      at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
      at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:652)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:600)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:666)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:460)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  
  Aug 20, 2014 4:43:57 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /HelloWorld threw load() exception
  java.lang.IllegalArgumentException
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
      at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
      at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
      at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
      at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
      at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:652)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:600)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:666)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:519)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:460)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  
  Aug 20, 2014 4:43:57 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Aug 20, 2014 4:43:57 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Aug 20, 2014 4:43:57 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 2186 ms
  </code></pre>
  
  <p>My Server Files as are as follows:
  server.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Server port="8005" shutdown="SHUTDOWN"&gt;
  &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/&gt;
    &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/&gt;
    &lt;GlobalNamingResources&gt;
      &lt;Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/&gt;
    &lt;/GlobalNamingResources&gt;
    &lt;Service name="Catalina"&gt;
      &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
      &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
      &lt;Engine defaultHost="localhost" name="Catalina"&gt;
        &lt;Realm className="org.apache.catalina.realm.LockOutRealm"&gt;
          &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
        &lt;/Realm&gt;
  
        &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"&gt;
          &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &amp;quot;%r&amp;quot; %s %b" prefix="localhost_access_log." suffix=".txt"/&gt;
  
        &lt;Context docBase="HelloWorld" path="/HelloWorld" reloadable="true" source="org.eclipse.jst.jee.server:HelloWorld"/&gt;&lt;/Host&gt;
      &lt;/Engine&gt;
    &lt;/Service&gt;
  &lt;/Server&gt;
  </code></pre>
  
  <p>tomcat-users.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;tomcat-users&gt;
  &lt;role rolename="admin-gui"/&gt;
  &lt;role rolename="manager-gui"/&gt;
  &lt;user password="SmarTec@123" roles="admin-gui,manager-gui" username="root"/&gt;
  &lt;/tomcat-users&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee                       http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;default&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.catalina.servlets.DefaultServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;debug&lt;/param-name&gt;
              &lt;param-value&gt;0&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;listings&lt;/param-name&gt;
              &lt;param-value&gt;false&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.jasper.servlet.JspServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;fork&lt;/param-name&gt;
              &lt;param-value&gt;false&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;xpoweredBy&lt;/param-name&gt;
              &lt;param-value&gt;false&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;3&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;default&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
          &lt;url-pattern&gt;*.jspx&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;30&lt;/session-timeout&gt;
      &lt;/session-config&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
  &lt;/web-app&gt;
  </code></pre>