Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8255717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:37:19+00:00 2026-06-08T01:37:19+00:00

I seem to have a problem with spring annotation-driven transaction managing and tomcat. These

  • 0

I seem to have a problem with spring annotation-driven transaction managing and tomcat.
These are some of the beans I use in my project:

<bean id="dataSource" class="service.myBatis.RoutingDataSource"> </bean>        

<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">   
    <property name="dataSource" ref="dataSource"/>              
</bean>  

<tx:annotation-driven  transaction-manager="transactionManager"  />

Everything works fine when i run the project in eclipse. But when i run the project in tomcat it doens’t get past the creation of beans. It also does not give me an error or any indication of what is wrong.

The log shows it finishes with instantiating a bean and then it suddenly destroys all beans:

[DEBUG] 12 jul 09:28:55.888 AM localhost-startStop-1 [org.springframework.beans.factory.support.DefaultListableBeanFactory]
Finished creating instance of bean 'org.springframework.transaction.config.internalTransactionAdvisor'

[INFO] 12 jul 09:28:55.895 AM localhost-startStop-1 [org.springframework.beans.factory.support.DefaultListableBeanFactory]
Destroying singletons in........

If i remove the <tx:annotation-driven transaction-manager="transactionManager" /> line the project will just startup normaly in tomcat and eclipse.

Usually if something works in eclipse and it doesn’t in tomcat it is caused by tomcat not finding some class/lib or resource. I have no idea what is causing this though

Could anyone tell me what the problem is? Why does it destroy all the beans without giving an error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:37:21+00:00Added an answer on June 8, 2026 at 1:37 am

    I figured it out. It was not spring that was causing the problems it was something else in my project. The error was put in some tomcat log instead of to the console. So it seemed like there was no error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I seem to have a problem passing some strings on from one form to
I have a very large problem. I've written a large app using Flex3/Tomcat/BlazeDS/Spring that
I've got an Eclipse Maven project for spring-data-jpa and QueryDsl. I seem to have
I seem to have a problem with getting MVC to fill in my custom
I seem to have a problem understanding how to conditionally test a boolean value
I seem to have a tricky problem since the latest ADT update to release
I have a problem which I cant seem to find answer to through searches
I have a problem which i can't seem to find the solution to. I
I seem to have the exact opposite problem than this question on stopping dock
I have a problem with my cfml code. The ListAppend() function doesn't seem to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.