Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring: No transaction manager has been configured
    primarykey
    data
    text
    <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>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload