title: Entity manager has not been injected:is the Spring Aspects JAR configured as an AJC/AJDT aspects library?
body: <p>I'm trying write a simple spring rest web service, since I'm not familiar with maven(and because maven usually can't et things done--connection issue), so I'm trying ant build now. Now, the build is ok and the service can run. But if the persistent function is triggered, it will prompt:</p>
  
  <pre><code> 01:48:39 Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'uncaughtException'; model is {exception=java.lang.IllegalStateException: Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)} -org.springframework.web.servlet.DispatcherServlet
   java.lang.IllegalStateException: Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)
      at com.books.domain.UserInfo.entityManager(UserInfo.java:96)
      at com.books.domain.UserInfo.findUserByNamePassword(UserInfo.java:157)
      at com.books.web.UserController.register(UserController.java:28)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
  </code></pre>
  
  <p>My ant build.xml:</p>
  
  <pre><code>&lt;target name="compile" depends="init" description="compile the source "&gt;
      &lt;!--&lt;javac srcdir="${src}" 
      debug="on"
      destdir="${build}" 
      classpathref="compile.classpath"
      includeantruntime="false"/&gt;--&gt;
      &lt;iajc source ="1.6" target="1.6" sourceroots="src/main/java" destDir="src/main/webapp/WEB-INF/classes" showweaveinfo="true" verbose="true"&gt;
          &lt;classpath&gt;
              &lt;path refid="compile.classpath"/&gt;
              &lt;path refid="aspectj.classpath"/&gt;
          &lt;/classpath&gt;
      &lt;/iajc&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>My applicationContext.xml:</p>
  
  <pre><code>&lt;bean class="org.springframework.orm.jpa.JpaTransactionManager" id="transactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
  &lt;/bean&gt;
  &lt;tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/&gt;
  &lt;bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Any help would be highly appreciated. Thanks!</p>