Estou usando o Spring 2.5.6 + Hibernate 3.3.1 + Hibernate EntityManager 3.4.0 e as exceções da JPA simplesmente não são lançadas. Testei com NoResultException e PersistenceException, com e sem o PersistenceExceptionTranslationPostProcessor. Essa mesma versão do Hibernate funciona corretamente com EJB 3.
Segue meu applicationContext.xml
[code] <?xml version="1.0" encoding="UTF-8"?>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="AreaTecnico" />
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven />
<context:annotation-config/>
<context:component-scan base-package="br.com.spdata.tecnico.model"/>
<context:component-scan base-package="br.com.spdata.persistence.dao"/>
<context:component-scan base-package="br.com.spdata.util"/>
</beans>[/code]
Alguma idéia?
Obrigado,
Felipe