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 7903235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:41:57+00:00 2026-06-03T09:41:57+00:00

Recently I’ve decided to move from Common DBCP to Tomcat JDBC Connection Pool. I

  • 0

Recently I’ve decided to move from Common DBCP to Tomcat JDBC Connection Pool. I changed bean description (using spring 3.1 + hibernate 4 + tomcat) and was faced with the next issue on my web app start up:

HHH000342: Could not obtain connection to query metadata : com.mysql.jdbc.Driver

and then when I try to query db from my app I am getting:

23:04:40,021 WARN [http-bio-8080-exec-10] spi.SqlExceptionHelper:(SqlExceptionHelper.java:143) – SQL Error: 0, SQLState: null

23:04:40,022 ERROR [http-bio-8080-exec-10] spi.SqlExceptionHelper:(SqlExceptionHelper.java:144) – com.mysql.jdbc.Driver

I must have done something wrong with configuration so hibernate cannot obtain connection but do not see it. really appreciate if you can point me to the right direction.

here is piece of my datasource bean definition

<bean id="jdbcDataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-              method="close"    
    p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://127.0.0.1:3306/test"
p:username="root"
p:password="test" 
p:defaultAutoCommit="false"
p:maxActive="100"
p:maxIdle="100"
    p:minIdle="10"
p:initialSize="10"
p:maxWait="30000"
p:testWhileIdle="true"   
p:validationInterval="60000"
p:validationQuery="SELECT 1"                
p:timeBetweenEvictionRunsMillis="60000"
p:minEvictableIdleTimeMillis="600000"
p:maxAge="360000"
/>

and here is how I tie it with spring’s session factory

<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
    <property name="dataSource" ref="jdbcDataSource" />...
  • 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-03T09:41:58+00:00Added an answer on June 3, 2026 at 9:41 am

    after migration, I forgot to add lib tomcat-jdbc to my classpath 🙂
    now it wroks

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

Sidebar

Related Questions

Recently I have migrated my project from SQLServer 2000 to MySQL 5.2 using MySQL
Recently, sometimes (rarely) when we export data from our application, the export log contains
Recently I've wanted to do a number of things using CSS only to find
Recently I'm doing some work on RTMP streaming, that is using Flowplayer to integrate
recently I started using storyboard and I've the following situation: I want to set
Recently we have released our product. Our team decided to preserve the source code
Recently two users of our software from the same company started experiencing random closures
Recently moved from svn to git, pardon my newbie question. In our release process,
Recently I updated SUbversion on my server from 1.5 to 1.7.2, and run the
Recently I was trying to determine the time needed to calculate a waveform using

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.