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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:52:55+00:00 2026-05-24T10:52:55+00:00

from the Glassfish server log am getting an error below WARNING: RAR8054: Exception while

  • 0

from the Glassfish server log am getting an error below

WARNING: RAR8054: Exception while creating an unpooled [test] connection for pool [ hrms/connectionPool ], null
WARNING: RAR8054: Exception while creating an unpooled [test] connection for pool [ hrms/connectionPool ], null

am getting a problem in implementing jdbc mysql datasource and connection pooling using jsp and struts framework. please help.

the code is shown…..

/*

     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package database;

    /**
     *
     * @author LenasalonM01
     */
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import javax.swing.JOptionPane;

    public class database {

        private Connection connect;
        private Statement statement;
        private ResultSet resultset;
        private InitialContext context;
        private DataSource datasource;


        public void connection() {
            try {
    //            load driver
                  Class.forName("com.mysql.jdbc.Driver").newInstance();


    //        initialize context
                context = new InitialContext();
    //        datasource path
                datasource = (DataSource) context.lookup("jdbc/hrms");
    //        connect to datasource
                connect = datasource.getConnection();
    //         create statement from connection made
                statement = connect.createStatement();
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e.getMessage());
            }

        }

        public void disconnect() {
            try {
                if (resultset != null) {
                    resultset.close();
                }
                if (connect != null) {
                    connect.close();
                }
                if (context != null) {
                    context.close();
                }

            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e.getMessage());
            }
        }

        public boolean checkValid(String query) {
            try {
                connection();
                resultset = statement.executeQuery(query);
                if (resultset.next()) {
                    return true;
                } else {
                    return false;
                }

            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e.getMessage());
                return false;
            }
        }

        public ResultSet fetchdata(String query) {
            try {
                connection();
                resultset = statement.executeQuery(query);
                disconnect();
                return resultset;

            } catch (Exception e) {
                return resultset;

            }
    //        return resultset;
        }
    }
  • 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-24T10:52:56+00:00Added an answer on May 24, 2026 at 10:52 am

    Is the MySQL daemon up and running? Can you connect to the server using the command line client? If not, start the server and re-run your application again.

    I would advise you to separate your database code from user interface stuff. You’ll regret combining the two the way you have someday.

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

Sidebar

Related Questions

I trying to call some ejb bean method from tread. and getting error :
I get this error: HTTP Status 500 - type Exception report message descriptionThe server
Im sending mails from a web application running on a glassfish server, which was
I can look up the remote interface of an EJB3 from a Glassfish 2.1
From what I've read, VS 2008 SP1 and Team Foundation Server SP1 packages are
From my understanding the XMPP protocol is based on an always-on connection where you
I have a EJB module in remote Glassfish server and application client in my
I have Glassfish 3 server and have added Quercus 4.0.7 to to be able
I'm facing strange error. I use Glassfish 3.1.1 withn jdk7 and since some time
Today I upgraded my local Glassfish server to 3.1.1 in preparation for my company's

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.