Note that there are some explanatory texts on larger screens.

plurals
  1. POjdbc mysql datasource connection error while working with struts
    primarykey
    data
    text
    <p>from the Glassfish server log am getting an error below</p> <p><strong>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</strong></p> <p>am getting a problem in implementing jdbc mysql datasource and connection pooling using jsp and struts framework. please help.</p> <p>the code is shown.....</p> <pre><code>/* * 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; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload