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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:08:21+00:00 2026-05-27T07:08:21+00:00

I know how to specific datasource connection pooling to a mysql server in Tomcat

  • 0

I know how to specific datasource connection pooling to a mysql server in Tomcat 7, add

<Resource type="javax.sql.DataSource"
        name="jdbc/TestDB"
        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/mysql"
        username="mysql_user"
        password="mypassword123"
/>

to my META-INF/context.xml,

  1. Can anyone show me how to do this to Microsoft Access?
  2. Do I need a JDBC – ODBC bridge to make connection from my Java web app to Microsoft Access?

UPDATE: This is my attempt, but I ran into SQLException

<Resource  type="javax.sql.DataSource"
           name="jdbc-odbc/qtl"
           maxActive="100"
           maxIdle="30"
           maxWait="10000"
           factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
           driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
           url="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=/Users/KingdomHeart/resources/db.mdb"               
           />

When I do this, I got WARNING: Unexpected exception resolving reference
java.sql.SQLException: sun.jdbc.odbc.JdbcOdbcDriver

UPDATE 2:: I tried to write a separate program in effort to make connection to Microsoft Access db. I got java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Here is my code. It must be that I need a jar driver in my class path, do I not?

public static void main(String[] args) {
    try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        String fileName = "/Users/KingdomHeart/resources/MyTable.mdb";
        String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
        database += fileName + ";DriverID=22;READONLY=true";
        Connection con = DriverManager.getConnection(database, "", "");
        System.out.println("here");
    } catch (SQLException ex) {
        Logger.getLogger(TestJdbcOdbc.class.getName()).log(Level.SEVERE, null, ex);
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(TestJdbcOdbc.class.getName()).log(Level.SEVERE, null, ex);
    }
}
  • 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-05-27T07:08:22+00:00Added an answer on May 27, 2026 at 7:08 am

    I’d use a URL like this:

    jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\path\\your-access-database.mdb
    

    The JDBC driver class is sun.jdbc.odbc.JdbcOdbcDriver (at least it was when I last used it; that was back in 2004).

    I prefer this style because it eliminates the step of creating an ODBC data source. It keeps the precise location of the file inside the Java deployment.

    Yes, you need the JDBC-ODBC bridge (unless you bought a commercial JDBC driver).

    You should be aware of the pitfalls of using Access in a multi-user environment:

    http://msdn.microsoft.com/en-us/library/aa167840(v=office.11).aspx

    My personal recommendation would be to use MySQL or PostgreSQL instead of Access.

    Here’s something else you might want to read about setting up a JNDI data source on Tomcat:

    http://craicpropagation.blogspot.com/2009/02/how-to-use-same-jndi-resource-name-on.html

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

Sidebar

Related Questions

I want to know the name of the specific editing mode in which the
We have a commercial software product under development. It supports Oracle, MySQL, and SQL*Server
I know this specific question has been asked before , but I am not
I'd like to know for a specific radio button group if a radio button
Anyone know how to query for a specific date within entity framework ? I
I know how to revert to a specific revision of a folder using these
I know that GDI handles are unique and process specific in 'Big Windows' but
I don't know if this is too specific a question, if that is possible,
I like to know is there any specific reason that there is no public
I know in Visual Studio 2008 you can target a specific framework with your

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.