How to get MS Access DB connection in struts frame work?

Hi All,
I am trying to get MS Access db connection in struts frame work .
I am using websphere.I don't know whether i have to set any configuration in the WSAD.
In struts-Config.xml i am having this mapping
<data-source
type="org.apache.commons.dbcp.BasicDataSource"
key="userDB" >
<set-property property="driverClassName"
value="sun.jdbc.odbc.JdbcOdbcDriver" />
<set-property property="url"
value="jdbc:odbc:localhost:9080/u:/EmpDetails.mdb" />
<set-property property="username" value="" />
<set-property property="password" value="" />
<set-property property="maxCount"
value="4" />
<set-property property=" minCount="
value="2" />
</data-source>
In the action class i am having this code
dataSource = getDataSource(request, "userDB");
conn = dataSource.getConnection();
stat=conn.createStatement();
result1=stat.executeQuery("select * from emp");
While trying to execute this code i am getting this error
java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted
any idea why this error is occuring?
Thanks in advance
Janaki.

Yes i know that but i only wanted to know how i will connect MS Access database with Java desktop Application in NetBeans

Similar Messages

  • How to get ssh access to my Azure Website?

    Hi,
    I can connect to Website via FilZilla using ftp hostname and username. But how to get ssh access to Azure Wedsite?

    ssh is not supported, but FTP should absolutely work using FileZilla. You can also use the
    Kudu Console, which gives you a console into your site.

  • How to get my macbook to connect to the Apple TV?

    How to get my macbook to connect to the Apple TV in a strange apartment? I am housesitting for someone for a few months. They mentioned that i would be able to use their Apple TV to play stuff from my macbook. I am using their basic wifi in the apt, which works fine on my macbook and iphone, but see no Apple TV icon appearing on macbook screen, nor any connection happening. (nor is there anything connection w my iPhone). What gives? How can I establish a connection?

    See
    http://support.apple.com/kb/ts4215

  • How to get kensington K9294 to connect with original iPad. Bluetooth is on.

    How to get Kensington K9294 to connect with original iPad. Bluetooth is on.

    Sorry, but what is a Kensington K9294? I can find no mention of that product ID on the web, not even on Kensington's site. Do you mean the K39294, the KeyFolio keyboard/case?
    Regards.

  • How to get the local lan connecting all the system names ?

    how to get the local lan connecting all the system names using java?
    any body know then send the coding or solution

    This question is asked and answered repeatedly. Search the forum.

  • How to create web site using STRUTS frame work

    Hi,
    I know how to create web pages using JSP & Servlets.But now i have to create Matrimonial web site using STRUTS frame work.Plz any one guide for me...
    Thank U....

    Struts is not to be confused with JSF.
    Start at their own homepage over there at apache.org.
    Good luck.

  • How to get my ipad to connect to itune if the password is locked

    How to get ipad to connect to itune if the password is locked.

    note total data loss
    recovery mode
    open itunes on computer
    plug cable into computer not iOS device
    turn device off
    hold home button and plug cable into IOS device.  do not release home button until an itunes graphic appears on IOS device.
    look to computer should have message about recovery mode click ok and restore
    Peace, Clyde
    if u need an article see
    http://support.apple.com/kb/HT1808

  • How to get MS Access report into Java by JNI

    hi,
    I am new to JNI and I need to know how could I get MS Access report data in my application. Specially, I am having difficulties in C coding part. I read API documentation and tutorials about JNI, so if you know where could I read about this topic send me that too.
    thanks

    use j-Interop , it has a sample for ADO access.

  • How to get list of user connected to project server by day wise

    HI,
    I need to get a report as how many times user  is connected to the project server in a week.
    I have enabled web analytical reports but its showing only how many times a user is connected to site.I need date also
    Project server 2010 version.
    Can any one help me.
    EX:
    Resource name           Date                 Connected (yes/No)
    Vijay  kumar            1-11-2014             yes
    Vijay  kumar            2-11-2014             yes               
    Vijay  kumar            3-11-2014             no
    Vijay  kumar            4-11-2014             yes
    Vijay  kumar            5-11-2014             yes
    Vijay  kumar            6-11-2014              no
    Vijay  kumar            7-11-2014             yes
    Thank You, Kumar KSV

    What Badal Ratra gave you would be the basis for your query to populate your own table...Project Server does not give you a way to do a daily connect report
    One of the ways I would go about doing this would be to run a nightly query to update a table - fill it in with the necessary data and run your report off that newly created table
    High Level Steps:
    (1) Create a table in the Reporting Database call DailyVisits
    (1a) The table would have Name/Date/Connected columns 
    (1b) You wouldn't need a no answer for connected columns since the answer would always be yes, the result set would ONLY have users who connected for each day.  And really you would only need 2 columns since the "connected" column would always
    be Yes...
    (2) Create a query that would query the published database (msp_resources) for the current day and store the result set in the table DailyVisits
    (3) Put this query in a nightly task to append to the DailyVisits table @ 11:55pm (for example)
    (4) Let the query run and you'll have only the users who connected for that day - the DailyVisits table would represent users who visited every day.  
    As long as the query runs nightly you'll have the information you're looking for - the one caveat is that it will only be starting from the day you start running the query.  
    You could also append the older user (last_connect) information from the resources table from other users to populate the dates but that would only represent a single entry/single last connect date.  This "old" information would represent the
    base for the table.
    hth

  • How to get "Easy" access to my Time Capsule files via Internet?

    Hello,
    I like to have a easy solution to acces my TC 2TB via Internet.
    I saw there is an easy way, if you have an MobileMe Account - but this service is since Lion, icloud and iOS5 not longer avalible. 
    Does anyone know how to get easy acces without DynDNS, FTP or other difficult solutions or does anyone knows a solution which will be avalible in the future?
    Thanks
    Flo

    Thanks for your fast answer.
    But as mentioned in THE NOTE my TC is a downstream router behind another router. The reason is that I am connected to the internet via Telekom entertain 16000 with an DSL/Modem/Router which one I need to connect my media Receiver.
    So is there a following solution which replaces the MobileMe Solution.

  • How to get ManagedBean for C3P0 connection pool.

    Hi there,
    How to get ManagedBean(C3P0PooledDataSourceMBean) for C3P0 connection pool, as the object name is getting constructed during run time.
    Thanks,
    Sid

    Hi there,
    How to get ManagedBean(C3P0PooledDataSourceMBean) for C3P0 connection pool, as the object name is getting constructed during run time.
    Thanks,
    Sid

  • How to get rid of Data Connection Refused message

    I have a blackberry 8703e, i recently disabled my blackberry data pack and ever since i did that I get the message data connection refused on my home screen. I know there is a solution for this problem for other devices like 8830 by simply going to Mobile Network and setting Data Services to OFF, but my device does not have data services as a option, I'm on the lastest OS 4.2.
    Another thing I noticed that now my battery gets drained faster, I have a new battery and lasts less than a day, compared to almost 2 days when I had the data plan on.. strange...

    About the battery - probably you're using some applications which consume energy.
    And check this link

  • How to get print shop premier edition 5.0 to work on 8.1

    Hello,
    I have several old programs from broderbund --- print shop premier 5.0 and print shop signature greetings that
    I would like to load and get to run on 8.1 but they do not seem to work.
    Any one know how to get these programs to work on 8.1.
    Thank You

    Diggin4it, welcome to the forum.
    Here is a guide to help you use Windows 8.1 Compatibility Mode.  It has been around in other versions of Windows, but is a bit different to access in Win 8.1.
    Please click the "Thumbs up + button" if I have helped you and click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • How to get instance of all components in a frame  dynamically

    Hai ,
    I want to know how to get the instance names and values of components on a frame . if any body knows anything on this
    Please help me
    Advance Thanks

    Hai ..
    Thanks for guiding me here i had copied my example code i am getting name value null
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    * @author  naveen
    public class Test extends javax.swing.JFrame {
        /** Creates new form RaviTest */
        public RaviTest() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            jButton1 = new javax.swing.JButton();
            getContentPane().setLayout(null);
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            getContentPane().add(jTextField1);
            jTextField1.setBounds(180, 60, 100, 20);
            getContentPane().add(jTextField2);
            jTextField2.setBounds(180, 90, 90, 20);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            getContentPane().add(jButton1);
            jButton1.setBounds(170, 140, 81, 26);
            pack();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // Add your handling code here:
            Component[] comp=this.getContentPane().getComponents();
            for(int i=0;i<comp.length;i++)
                if(comp[i] instanceof JTextField)
                    getT((JTextField)comp);
    public void getT(JTextField jt)
    System.out.print("name "+jt.getName());
    System.out.println("value "+jt.getText());
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {
    System.exit(0);
    * @param args the command line arguments
    public static void main(String args[]) {
    new RaviTest().show();
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    // End of variables declaration
    OUTPUT AS :
    if we enter some text in text box and press the button we get like this
    name null value ABCD
    name null value EFGH
    may be some components will have name but if they names are not set
    then we get null value
    what i want is at that i want the jTextField1.. as name(ie.. object name) when the name is not set how to do it

  • I recently used the migration assistant and now my music has not transferred and it wont play, any ideas on how to get all my music and films to actually work?

    Hello,
    I recently used the migration assistant on my old macbook air to transfer my data to my new macbook pro, yet it seems that my music and Films have not fully transferred over. i have used macs for a while now and haven't had any problems before, yet now itunes has the names of my music and films yet it can't locate the original file. any ideas on how to get this fixed? i don't want to buy all my music and films again.
    Help?!
    Thanks

    Did the original files actually transfer? They would be in Music>iTunes>iTunes Music. You may just need to rebuild the library if the files are in that folder.
    Clinton

Maybe you are looking for

  • Accounting Document number from Purchasing Document Number

    Hi Gurus, My Requirement is that i have a Purchasing Document number (EBELN) and i need Accounting Document Number( BELNR_D)  so that i can get the Amount in Document Currency (WRBTR) for that document .

  • XI AF API call failed. Module exception: Java Mapping

    Hi Experts, I have faced a typical error for one of my interface. The Scenario is SOAP to SOAP and we are performing SOAP Lookup  before sending the data to Target web service. We are using one Java Mapping  'FileIns_lookupLoad.java --- com/fi/' and

  • Can't import PSD from Photoshop

    This is weird. Trying to import a PSD file. Error message from PPro cs6 is "We were unable to open the file on disk." The file is a still image that came to me as a JPG. I read it into Photoshop cs6, cropped it, made the canvas 1920 x 1080 (to match

  • Add music to Elements 13 edited video

    I wish to add music to a video edited in Elements 13.  Under the audio icon I can only access sound effects.

  • What does these codees mean?

    Pls help me with the meaning of the following codes, 1. int count; for (int i = 0; i<COUNT.length; i++) count = Integer.parseInt(COUNT); 2. if(POINT.compareTo("R") != 0) 3.if (COUNT_02.compareTo("0") != 0) 4.result.addValue(EAN_04count_EAN+3); 5.resu