title: Spring: No transaction manager has been configured
body: <p>I've been wrestling with this problem for a while, and don't see a solution. Hope anyone can help me.</p>
  
  <p>I have a HibernateTransactionManager configured. However, I see the following message in the log file:</p>
  
  <p>DEBUG [http-8080-1] AnnotationTransactionAttributeSource.getTransactionAttribute(107) | Adding transactional method [cashIn] with attribute [PROPAGATION_REQUIRED, ISOLATION_DEFAULT, -nl.forestfields.picnic.domain.model.exception.IllegalCostException]</p>
  
  <p>DEBUG [http-8080-1] AnnotationTransactionAspect.createTransactionIfNecessary(267) | Skipping transactional joinpoint [nl.forestfields.picnic.view.controller.ShoppingListController.cashIn] because no transaction manager has been configured</p>
  
  <p>Also, in case of an exception, the transaction isn't rolled back.</p>
  
  <p>Here's my configuration:</p>
  
  <p>picnic-servlet.xml:</p>
  
  <pre><code>  &lt;beans&gt;
  
      &lt;context:component-scan base-package="picnic" /&gt;
      &lt;context:annotation-config /&gt;
  
      &lt;tx:annotation-driven /&gt;
      .
      .
      .
  </code></pre>
  
  <p>picnic-context-db.xml:
  
  </p>
  
  <pre><code>&lt;bean class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" id="sessionFactory"&gt;
  
      &lt;property name="configLocation" value="classpath:hibernate.cfg.xml" /&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;${hibernate.dialect}&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;${hibernate.show_sql}&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"&gt;
      &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
   &lt;/bean&gt;
  
  &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName"&gt;
          &lt;value&gt;${hibernate.connection.driver_class}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="url"&gt;
          &lt;value&gt;${hibernate.connection.url}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="username"&gt;
          &lt;value&gt;${hibernate.connection.username}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="password"&gt;
          &lt;value&gt;${hibernate.connection.password}&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>The code that should be executed inside a transaction:</p>
  
  <pre><code>@Transactional(rollbackFor=IllegalCostException.class)
  public ModelAndView cashIn(@RequestParam final Long id) throws IllegalCostException, llegalOrderStateException, IllegalShoppingListStateException {
  
    final ShoppingList shoppingList = shoppingListRepository.getById(id);
    shoppingList.cashIn();
    shoppingListRepository.add(shoppingList);
  
    return new ModelAndView(...);
  }
  </code></pre>
  
  <p>Can anyone see the problem?</p>
  
  <p>Cheers,
  Jippe </p>