Spring tx:annotation-driven works in eclipse, but not in tomcat -


I think there is a problem with Spring Annotation-powered transaction management and Tomcat. These are some beans in my reproduction:

  & lt; Bean id = "datasource" class = "service.mbitis.routingdatasource" & gt; & Lt; / Bean & gt; & Lt; Bean id = "Transaction manager" class = "org.springframework.jdbc.datasource.DataSourceTransactionManager" & gt; & Lt; Property Name = "Data Source" Riff = "Data Sources" / & gt; & Lt; / Bean & gt; & Lt; Tx: annotation-driven transaction-manager = "transaction manager" />   

When I run the project in eclipse, everything works fine. But when I run the project in Tomcat, it does not get before the creation of beans. It does not even give an indication of whether I am an error or a wrong.

The log shows that it immediately transforms the bean and then suddenly destroys all beans:

  [DEBUG] 12 July 09: 28: 55.888 Preparing an example of local host-startStop-1 [org.springframework.beans.factory.support.DefaultListableBeanFactory] Bean 'org.springframework.transaction.config.internalTransactionAdvisor' [INFO] 12 June 09: 28: 55.895 AM localhost Delete the singleton in StartStop-1 [org.springframework.beans.factory.support.DefaultListableBeanFactory] ........   

If I delete it & Lt; Tx: annotation-driven transaction-manager = "transaction manager" /> The line project will only start in Tomcat and Eclipse.

Usually if something works in eclipse and it is not in the Tomcat, it is caused by some class / liberalization or not searching for a resource, I do not know what is the reason

Can anyone tell me what is the problem? Why did all these beans destroy without any errors?

I understood that it was not spring which was causing problems, it was something else in my project The error was placed in some logic log instead of the console, it seemed that there was no error.

Comments

Popular posts from this blog

python - Assemble mpeg file unable to play in mediaplayer -

c# - crystal report failed -

mongodb - CakePHP paginator ignoring order, but only for certain values -