title: What is the following error in my Maven project? Access Denied
body: <p>Error as shown in Marker:</p>
  
  <blockquote>
    <p>Error occured processing XML
    'C:\Users\CHANDAN-G\Documents\workspace-sts-3.6.3.RELEASE\java-blog-aggregator\target\classes\com\chandan\blog\controller\IndexController.class
    (Access is denied)'. See Error Log for more
    details   dispatcher-servlet.xml  /java-blog-aggregator/src/main/webapp/WEB-INF   line
    8 Spring Beans Problem</p>
  </blockquote>
  
  <p>In my <code>dispatcher-servlet.xml</code>:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"&gt;
  
  //THIS BELOW LINE HAS THE FOLLOWING ERROR AS SHOWN BY MARKER:
  &lt;context:component-scan base-package="com.chandan.blog.controller"&gt;&lt;/context:component-scan&gt;
  
  &lt;bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"&gt;
      &lt;property name="definitions"&gt;
          &lt;list&gt;
              &lt;value&gt;/WEB-INF/defs/general.xml&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
      &lt;property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/&gt;
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Dependencies and Plugins In my <code>Pom.xml</code>:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.chandan.blog&lt;/groupId&gt;
    &lt;artifactId&gt;java-blog-aggregator&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
  
    &lt;!-- Shared version number properties --&gt;
  &lt;properties&gt;
      &lt;org.springframework.version&gt;4.1.3.RELEASE&lt;/org.springframework.version&gt;
      &lt;apache.tiles&gt;3.0.5&lt;/apache.tiles&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
  &lt;!--
      Core utilities used by other modules.
      Define this if you use Spring Utility APIs (org.springframework.core.*/org.springframework.util.*)
  --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt;
          &lt;artifactId&gt;tiles-core&lt;/artifactId&gt;
          &lt;version&gt;${apache.tiles}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt;
          &lt;artifactId&gt;tiles-jsp&lt;/artifactId&gt;
          &lt;version&gt;${apache.tiles}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;1.7.7&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
      &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Expression Language (depends on spring-core)
      Define this if you use Spring Expression APIs (org.springframework.expression.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- 
      Bean Factory and JavaBeans utilities (depends on spring-core)
      Define this if you use Spring Bean APIs (org.springframework.beans.*) 
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
      &lt;artifactId&gt;cxf-bundle&lt;/artifactId&gt;
      &lt;version&gt;2.7.6&lt;/version&gt;
  &lt;/dependency&gt;
  
  
  &lt;!--
      Aspect Oriented Programming (AOP) Framework (depends on spring-core, spring-beans)
      Define this if you use Spring AOP APIs (org.springframework.aop.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Application Context (depends on spring-core, spring-expression, spring-aop, spring-beans) 
      This is the central artifact for Spring's Dependency Injection Container and is generally always defined
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Various Application Context utilities, including EhCache, JavaMail, Quartz, and Freemarker integration
      Define this if you need any of these integrations
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Transaction Management Abstraction (depends on spring-core, spring-beans, spring-aop, spring-context)
      Define this if you use Spring Transactions or DAO Exception Hierarchy
      (org.springframework.transaction.*/org.springframework.dao.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      JDBC Data Access Library (depends on spring-core, spring-beans, spring-context, spring-tx)
      Define this if you use Spring's JdbcTemplate API (org.springframework.jdbc.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Object-to-Relation-Mapping (ORM) integration with Hibernate, JPA, and iBatis.
      (depends on spring-core, spring-beans, spring-context, spring-tx)
      Define this if you need ORM (org.springframework.orm.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Object-to-XML Mapping (OXM) abstraction and integration with JAXB, JiBX, Castor, XStream, and XML Beans.
      (depends on spring-core, spring-beans, spring-context)
      Define this if you need OXM (org.springframework.oxm.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Web application development utilities applicable to both Servlet and Portlet Environments
      (depends on spring-core, spring-beans, spring-context)
      Define this if you use Spring MVC, or wish to use Struts, JSF, or another web framework with Spring (org.springframework.web.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Spring MVC for Servlet Environments (depends on spring-core, spring-beans, spring-context, spring-web)
      Define this if you use Spring MVC with a Servlet Container such as Apache Tomcat (org.springframework.web.servlet.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Spring MVC for Portlet Environments (depends on spring-core, spring-beans, spring-context, spring-web)
      Define this if you use Spring MVC with a Portlet Container (org.springframework.web.portlet.*)
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-webmvc-portlet&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!--
      Support for testing Spring applications with tools such as JUnit and TestNG
      This artifact is generally always defined with a 'test' scope for the integration testing framework and unit testing stubs
  --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
          &lt;artifactId&gt;maven-plugin-tools&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;9.3.0.M0&lt;/version&gt;
          &lt;/plugin&gt;
  
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.2&lt;/version&gt;
              &lt;configuration&gt;
          &lt;source&gt;1.8&lt;/source&gt;
    &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;       
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;/project&gt;
  </code></pre>
  
  <p>Detailed Error in Console:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO] 
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building java-blog-aggregator 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; jetty-maven-plugin:9.3.0.M0:run (default-cli) @ java-blog-aggregator &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ java-blog-aggregator ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 0 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ java-blog-aggregator ---
  [INFO] Changes detected - recompiling the module!
  [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
  [INFO] Compiling 1 source file to C:\Users\CHANDAN-G\Documents\workspace-sts-3.6.3.RELEASE\java-blog-aggregator\target\classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /C:/Users/CHANDAN-G/Documents/workspace-sts-3.6.3.RELEASE/java-blog-aggregator/src/main/java/com/chandan/blog/controller/IndexController.java:[7,8] error while writing com.chandan.blog.controller.IndexController: C:\Users\CHANDAN-G\Documents\workspace-sts-3.6.3.RELEASE\java-blog-aggregator\target\classes\com\chandan\blog\controller\IndexController.class (Access is denied)
  [INFO] 1 error
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 14.194 s
  [INFO] Finished at: 2014-12-12T12:30:42+05:30
  [INFO] Final Memory: 19M/128M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project java-blog-aggregator: Compilation failure
  [ERROR] /C:/Users/CHANDAN-G/Documents/workspace-sts-3.6.3.RELEASE/java-blog-aggregator/src/main/java/com/chandan/blog/controller/IndexController.java:[7,8] error while writing com.chandan.blog.controller.IndexController: C:\Users\CHANDAN-G\Documents\workspace-sts-3.6.3.RELEASE\java-blog-aggregator\target\classes\com\chandan\blog\controller\IndexController.class (Access is denied)
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>