Olá,
Ao tentar usar o elemento <tx:annotation-driven /> no bean.xml da aplicação obtenho o seguinte erro ao subir o tomcat:
SEVERE: Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 29 i n XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘tx:annotation-driven’.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:327)
O bean.xml da aplicação é o seguinte:
<?xml version="1.0" encoding="UTF-8"?><bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean" />
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<bean id="transacaoService" class="br.com.tiss.financeiro.negocio.TransacaoFinanceiraService"/>
<bean id="favorecidoService" class="br.com.tiss.financeiro.negocio.FavorecidoService"/>
<bean id="categoriaService" class="br.com.tiss.financeiro.negocio.CategoriaService"/>
<tx:annotation-driven transaction-manager="transactionManager"/>
Abraço
Sávio Barros