title: Eclipse Maven Spring Project - Error
body: <p>I need help with an error which make me crazy. <br>
  I started to study Java EE and I am going through tutorial on youtube. Everything went well till I came to Spring, Hibernate, JSF preparing project.<br>
  I added dependencies to my pom.xml project like you can see below, but in my config files I am having an error:<br>
  <strong>"Build path is incomplete can't find class file for org/aspectj/weaver/BCException"</strong><br>
  I was looking on google and also here for an answer answer to my question. I found that I need to add aspectj dependency, but still it doesn't work and I am having the same error.<br><br>
  I included following libaries to my project: (So I guess its not a problem with missing libary)
  <img src="https://i.stack.imgur.com/uY5qh.png" alt="enter image description here">
  <br>
  <br>
  My pom.xml file:</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.example.j2eeapp&lt;/groupId&gt;
  &lt;artifactId&gt;j2eeapplication&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;J2EE Application Example&lt;/name&gt;
  
  &lt;!-- 
  Prime faces helps in building themes for jsf
   --&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
              &lt;id&gt;prime-repo&lt;/id&gt;
              &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;
              &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  
  &lt;!-- 
  hibernate helps manage database via java
   --&gt;
   &lt;dependencies&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;4.1.8.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;4.2.0.Final&lt;/version&gt;
      &lt;/dependency&gt;     
      &lt;dependency&gt;
              &lt;groupId&gt;aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
              &lt;version&gt;1.5.2&lt;/version&gt;
      &lt;/dependency&gt;      
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.8.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
   &lt;!-- 
  Spring Web flow is specifically designed to implement complex page flows. 
  It is an extension of Spring MVC and a tool 
  to specify page navigation rules and manage navigation.
   --&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.webflow&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webflow&lt;/artifactId&gt;
              &lt;version&gt;2.3.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
   &lt;!-- 
  The Spring Faces module comes with a set of components, 
  which are provided through a tag library.
   --&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.webflow&lt;/groupId&gt;
              &lt;artifactId&gt;spring-faces&lt;/artifactId&gt;
              &lt;version&gt;2.3.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.webflow&lt;/groupId&gt;
              &lt;artifactId&gt;spring-js&lt;/artifactId&gt;
              &lt;version&gt;2.0.9.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;3.1.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;com.oracle&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc14&lt;/artifactId&gt;
              &lt;version&gt;10.2.0.1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
              &lt;version&gt;2.1.10&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;com.sun.facelets&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-facelets&lt;/artifactId&gt;
              &lt;version&gt;1.1.14&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
              &lt;version&gt;2.1.10&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
              &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
              &lt;version&gt;20030825.184428&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.6.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.0.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;3.0.5.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;xml-apis&lt;/groupId&gt;
              &lt;artifactId&gt;xml-apis&lt;/artifactId&gt;
              &lt;version&gt;1.3.02&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
              &lt;version&gt;3.1.3.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;3.1.3.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
                      &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
              &lt;version&gt;3.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;cglib&lt;/groupId&gt;
              &lt;artifactId&gt;cglib&lt;/artifactId&gt;
              &lt;version&gt;2.2.2&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;4.1.8.Final&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;3.1.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
  
    &lt;/dependencies&gt;
    &lt;--
       This is what I added, after I read some answer to my question on stackoverflow. Doesn't work me.
    --&gt;
    &lt;build&gt;
      &lt;plugins&gt;
                  &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;aspectj-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.4&lt;/version&gt;
          &lt;configuration&gt;
              &lt;showWeaveInfo&gt;true&lt;/showWeaveInfo&gt;
              &lt;source&gt;1.7.0&lt;/source&gt;
              &lt;target&gt;1.7.0&lt;/target&gt;
              &lt;Xlint&gt;ignore&lt;/Xlint&gt;
              &lt;complianceLevel&gt;1.7.0&lt;/complianceLevel&gt;
              &lt;encoding&gt;UTF-8&lt;/encoding&gt;
              &lt;verbose&gt;false&lt;/verbose&gt;
              &lt;aspectLibraries&gt;
                  &lt;aspectLibrary&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
                  &lt;/aspectLibrary&gt;
              &lt;/aspectLibraries&gt;
          &lt;/configuration&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
                  &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
                  &lt;version&gt;1.7.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
                  &lt;artifactId&gt;aspectjtools&lt;/artifactId&gt;
                  &lt;version&gt;1.7.0&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p>And here you can see one of the files which contains an error: ( I deleted xml declaration and added comments in the place when an error occurred)</p>
  
  <pre><code>    &lt;!-- HERE --&gt;               
      &lt;bean id="jpaFlowExecutionListener"   class="org.springframework.webflow.persistence.JpaFlowExecutionListener"&gt;
              &lt;constructor-arg ref="entityManagerFactory" /&gt;
              &lt;constructor-arg ref="transactionManager" /&gt;
      &lt;/bean&gt;
       &lt;!-- HERE --&gt;
      &lt;bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" /&gt;
  
      &lt;webflow:flow-executor id="flowExecutor"&gt;
              &lt;webflow:flow-execution-listeners&gt;
                      &lt;webflow:listener ref="jpaFlowExecutionListener" /&gt;
                      &lt;webflow:listener ref="facesContextListener"/&gt;
                      &lt;webflow:listener ref="securityFlowExecutionListener"/&gt;
              &lt;/webflow:flow-execution-listeners&gt;
      &lt;/webflow:flow-executor&gt;                        
      &lt;!-- HERE --&gt;
      &lt;webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows"&gt;
              &lt;webflow:flow-location-pattern value="/**/*-flow.xml" /&gt;
      &lt;/webflow:flow-registry&gt;
  
      &lt;faces:flow-builder-services id="facesFlowBuilderServices" development="true" /&gt;
  
      &lt;faces:resources /&gt;
      &lt;!-- HERE --&gt;
      &lt;bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"&gt;
              &lt;property name="order" value="1"/&gt;
              &lt;property name="flowRegistry" ref="flowRegistry" /&gt;
              &lt;property name="defaultHandler"&gt;
      &lt;!-- HERE --&gt;             
      &lt;bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" /&gt;
              &lt;/property&gt;
      &lt;/bean&gt;
      &lt;!-- HERE --&gt;
      &lt;bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter"&gt;
              &lt;property name="flowExecutor" ref="flowExecutor" /&gt;
      &lt;/bean&gt;
      &lt;!-- HERE --&gt;
      &lt;bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
              &lt;property name="viewClass" value="org.springframework.faces.mvc.JsfView"/&gt;
              &lt;property name="prefix" value="/WEB-INF/" /&gt;
              &lt;property name="suffix" value=".xhtml" /&gt;
      &lt;/bean&gt;
      &lt;!-- HERE --&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>I would really appreciate your help.</p>
  
  <hr>
  
  <p>Benzonico I checked in my classes, if BCExcepction is visible, seems it is. 
  Also I added externals jars aspectj and xwork and it still doesn't work.</p>
  
  <p>The problem is weird imo, since on the explorer tab on the left side of the eclipse, when you check you will find that there is no error placed in the class name. Now in the center of the eclipse where code is placed you can see, that problem occurs.</p>
  
  <p><img src="https://i.stack.imgur.com/uY5qh.png" alt="enter image description here"></p>
  
  <p>Still I need help with this question. Anyone?</p>