title: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
body: <p>I have an error when I use AspectJ:</p>
  
  <p>Controller:</p>
  
  <pre class="lang-java prettyprint-override"><code>@RequestMapping("/logout")
  public ModelAndView Logout(
      Locale locale,
      Model model,
      HttpServletRequest request
  ) throws ParseException {
      NguoiDung student = new NguoiDung();
      student = (NguoiDung) request.getSession().getAttribute("customer");
      String email = student.getEmail();
      dangxuat(email);
      request.getSession().removeAttribute("chuyentrang");
      request.getSession().removeAttribute("nguoidung");
      request.getSession().removeAttribute("customer");
      return new ModelAndView("login");
  }
  </code></pre>
  
  <p>Class LoggingAspectJ</p>
  
  <pre class="lang-java prettyprint-override"><code>public aspect LoggingAspectJ {
      pointcut callLogout(String email) :
          call(* StudentController.dangxuat(String)) &amp;&amp;
          args(email) &amp;&amp; 
          within(StudentController);
  
      after(String email) : callLogout(email) {
          System.out.println("Logout");
      }
  }
  </code></pre>
  
  <p>When I choose Logout, I got the following error:</p>
  
  <p><strong>type</strong></p>
  
  <pre><code>Exception report
  </code></pre>
  
  <p><strong>message</strong></p>
  
  <pre><code>Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
  </code></pre>
  
  <p><strong>description</strong></p>
  
  <pre><code>The server encountered an internal error that prevented it from fulfilling this request.
  </code></pre>
  
  <p><strong>exception</strong></p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Handler
  processing failed; nested exception is java.lang.NoClassDefFoundError:
  org/aspectj/lang/NoAspectBoundException
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p><strong>root cause</strong></p>
  
  <pre><code>java.lang.NoClassDefFoundError:
  org/aspectj/lang/NoAspectBoundException
      com.joseph.controller.StudentController.Logout(StudentController.java:124)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p><strong>root cause</strong></p>
  
  <pre><code>java.lang.ClassNotFoundException:
  org.aspectj.lang.NoAspectBoundException
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
      com.joseph.controller.StudentController.Logout(StudentController.java:124)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>