"com.mysql.jdbc.PacketTooBigException": Help needed urgently

hi,
I am using mm.mysql j/connector ver 3.0.6 and MYSQL server version 4.0.
Max_allowed packet= 8MB at the server side
I am getting PacketTooBigException when i am trying to update a particular column.
What should i do.
Any help will be greatly appreciated!!!

the driver uses a 64 k max packet size by default. it is supposed to change this as neccessary upon connection but perhaps that is failing?
below is the 3.0.7 connection code that i have slightly modified for you so that it prints out the connection properties after they have been initialized so that you can see what they are.
try it out and i hope you find this helpful.
   Copyright (C) 2002 MySQL AB
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.
      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.
      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
/*Slight Modification by Max Stocker April 29, 2003 to trace what the connection values get initialized to. */
package com.mysql.jdbc;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Clob;
import java.sql.Date;
import java.sql.ParameterMetaData;
import java.sql.Ref;
import java.sql.SQLException;
import java.sql.Savepoint;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.TimeZone;
* A Connection represents a session with a specific database.  Within the
* context of a Connection, SQL statements are executed and results are
* returned.
* <P>A Connection's database is able to provide information describing
* its tables, its supported SQL grammar, its stored procedures, the
* capabilities of this connection, etc.  This information is obtained
* with the getMetaData method.
* @see java.sql.Connection
* @author Mark Matthews
* @version $Id: Connection.java,v 1.31.2.19 2003/03/28 22:42:24 mmatthew Exp $
public class Connection implements java.sql.Connection {
    // The command used to "ping" the database.
    // Newer versions of MySQL server have a ping() command,
    // but this works for everything
    private static final String PING_COMMAND = "SELECT 1";
     * Map mysql transaction isolation level name to
     * java.sql.Connection.TRANSACTION_XXX
    private static Map mapTransIsolationName2Value = null;
     * The mapping between MySQL charset names
     * and Java charset names.
     * Initialized by loadCharacterSetMapping()
    private static Map charsetMap;
     * Table of multi-byte charsets.
     * Initialized by loadCharacterSetMapping()
    private static Map multibyteCharsetsMap;
     * Default socket factory classname
    private static final String DEFAULT_SOCKET_FACTORY = StandardSocketFactory.class
        .getName();
    static {
        loadCharacterSetMapping();
        mapTransIsolationName2Value = new HashMap(8);
        mapTransIsolationName2Value.put("READ-UNCOMMITED",
            new Integer(TRANSACTION_READ_UNCOMMITTED));
          mapTransIsolationName2Value.put("READ-UNCOMMITTED",
               new Integer(TRANSACTION_READ_UNCOMMITTED));
        mapTransIsolationName2Value.put("READ-COMMITTED",
            new Integer(TRANSACTION_READ_COMMITTED));
        mapTransIsolationName2Value.put("REPEATABLE-READ",
            new Integer(TRANSACTION_REPEATABLE_READ));
        mapTransIsolationName2Value.put("SERIALIZABLE",
            new Integer(TRANSACTION_SERIALIZABLE));
     * Internal DBMD to use for various database-version
     * specific features
    private DatabaseMetaData dbmd = null;
     * The list of host(s) to try and connect to
    private List hostList = null;
      * A map of statements that have had setMaxRows() called on them
     private Map statementsUsingMaxRows;
     * The I/O abstraction interface (network conn to
     * MySQL server
    private MysqlIO io = null;
     * Mutex
    private final Object mutex = new Object();
     * The driver instance that created us
    private NonRegisteringDriver myDriver;
     * The map of server variables that we retrieve
     * at connection init.
    private Map serverVariables = null;
     * Properties for this connection specified by user
    private Properties props = null;
     * The database we're currently using
     * (called Catalog in JDBC terms).
    private String database = null;
     * If we're doing unicode character conversions,
     * what encoding do we use?
    private String encoding = null;
     * The hostname we're connected to
    private String host = null;
     * The JDBC URL we're using
    private String myURL = null;
     * The password we used
    private String password = null;
     * Classname for socket factory
    private String socketFactoryClassName = null;
     * The user we're connected as
    private String user = null;
     * The timezone of the server
    private TimeZone serverTimezone = null;
     * Allow LOAD LOCAL INFILE (defaults to true)
    private boolean allowLoadLocalInfile = true;
     * Are we in autoCommit mode?
    private boolean autoCommit = true;
     * Should we capitalize mysql types
    private boolean capitalizeDBMDTypes = false;
     * Should we continue processing batch commands if
     * one fails. The JDBC spec allows either way, so
     * we let the user choose
    private boolean continueBatchOnError = true;
     * Should we do unicode character conversions?
    private boolean doUnicode = false;
     * Are we failed-over to a non-master host
    private boolean failedOver = false;
    /** Does the server suuport isolation levels? */
    private boolean hasIsolationLevels = false;
     * Does this version of MySQL support quoted identifiers?
    private boolean hasQuotedIdentifiers = false;
    // This is for the high availability :) routines
    private boolean highAvailability = false;
     * Has this connection been closed?
    private boolean isClosed = true;
     * Should we tell MySQL that we're an interactive client?
    private boolean isInteractiveClient = false;
     * Is the server configured to use lower-case
     * table names only?
    private boolean lowerCaseTableNames = false;
     * Has the max-rows setting been changed from
     * the default?
    private boolean maxRowsChanged = false;
     * Do we expose sensitive information in exception
     * and error messages?
    private boolean paranoid = false;
     * Should we do 'extra' sanity checks?
    private boolean pedantic = false;
     * Are we in read-only mode?
    private boolean readOnly = false;
    /** Do we relax the autoCommit semantics? (For enhydra, for example) */
    private boolean relaxAutoCommit = false;
     * Do we need to correct endpoint rounding errors
    private boolean strictFloatingPoint = false;
     * Do we check all keys for updatable result sets?
    private boolean strictUpdates = true;
    /** Are transactions supported by the MySQL server we are connected to? */
    private boolean transactionsSupported = false;
     * Has ANSI_QUOTES been enabled on the server?
    private boolean useAnsiQuotes = false;
     * Should we use compression?
    private boolean useCompression = false;
     * Can we use the "ping" command rather than a
     * query?
    private boolean useFastPing = false;
     * Should we tack on @hostname in DBMD.getTable/ColumnPrivileges()?
    private boolean useHostsInPrivileges = true;
     * Should we use SSL?
    private boolean useSSL = false;
     * Should we use stream lengths in prepared statements?
     * (true by default == JDBC compliant)
    private boolean useStreamLengthsInPrepStmts = true;
     * Should we use timezone information?
    private boolean useTimezone = false;
    /** Should we return PreparedStatements for UltraDev's stupid bug? */
    private boolean useUltraDevWorkAround = false;
    private double initialTimeout = 2.0D;
     * How many hosts are in the host list?
    private int hostListSize = 0;
     * isolation level
    private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
     * The largest packet we can send (changed
     * once we know what the server supports, we
     * get this at connection init).
    private int maxAllowedPacket = 65536;
    private int maxReconnects = 3;
     * The max rows that a result set can contain.
     * Defaults to -1, which according to the JDBC
     * spec means "all".
    private int maxRows = -1;
    private int netBufferLength = 16384;
     * The port number we're connected to
     * (defaults to 3306)
    private int port = 3306;
     * How many queries should we wait before we try to re-connect
     * to the master, when we are failing over to replicated hosts
     * Defaults to 50
    private int queriesBeforeRetryMaster = 50;
     * What should we set the socket timeout to?
    private int socketTimeout = 0; // infinite
     * When did the last query finish?
    private long lastQueryFinishedTime = 0;
     * When did the master fail?
    private long masterFailTimeMillis = 0L;
     * Number of queries we've issued since the master
     * failed
    private long queriesIssuedFailedOver = 0;
     * How many seconds should we wait before retrying to connect
     * to the master if failed over? We fall back when either
     * queriesBeforeRetryMaster or secondsBeforeRetryMaster is
     * reached.
    private long secondsBeforeRetryMaster = 30L;
     * The type map for UDTs (not implemented, but used by
     * some third-party vendors, most notably IBM WebSphere)
    private Map typeMap;
     * Ignore non-transactional table warning for rollback?
    private boolean ignoreNonTxTables = false;
     * Creates a connection to a MySQL Server.
     * @param host the hostname of the database server
     * @param port the port number the server is listening on
     * @param info a Properties[] list holding the user and password
     * @param database the database to connect to
     * @param url the URL of the connection
     * @param d the Driver instantation of the connection
     * @exception java.sql.SQLException if a database access error occurs
    Connection(String host, int port, Properties info, String database,
        String url, NonRegisteringDriver d) throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = { host, new Integer(port), info, database, url, d };
            Debug.methodCall(this, "constructor", args);
        this.serverVariables = new HashMap();
        hostList = new ArrayList();
        if (host == null) {
            this.host = "localhost";
            hostList.add(this.host);
        } else if (host.indexOf(",") != -1) {
            // multiple hosts separated by commas (failover)
            StringTokenizer hostTokenizer = new StringTokenizer(host, ",", false);
            while (hostTokenizer.hasMoreTokens()) {
                hostList.add(hostTokenizer.nextToken().trim());
        } else {
            this.host = host;
            hostList.add(this.host);
        hostListSize = hostList.size();
        this.port = port;
        if (database == null) {
            throw new SQLException("Malformed URL '" + url + "'.", "S1000");
        this.database = database;
        this.myURL = url;
        this.myDriver = d;
        this.user = info.getProperty("user");
        this.password = info.getProperty("password");
        if ((this.user == null) || this.user.equals("")) {
            this.user = "nobody";
        if (this.password == null) {
            this.password = "";
        this.props = info;
        initializeDriverProperties(info);
        if (Driver.DEBUG) {
            System.out.println("Connect: " + this.user + " to " + this.database);
        try {
            createNewIO(false);
            this.dbmd = new DatabaseMetaData(this, this.database);
        } catch (java.sql.SQLException ex) {
            cleanup();
            // don't clobber SQL exceptions
            throw ex;
        } catch (Exception ex) {
            cleanup();
            StringBuffer mesg = new StringBuffer();
            if (!useParanoidErrorMessages()) {
                mesg.append("Cannot connect to MySQL server on ");
                mesg.append(this.host);
                mesg.append(":");
                mesg.append(this.port);
                mesg.append(".\n\n");
                mesg.append("Make sure that there is a MySQL server ");
                mesg.append("running on the machine/port you are trying ");
                mesg.append(
                    "to connect to and that the machine this software is "
                    + "running on ");
                mesg.append("is able to connect to this host/port "
                    + "(i.e. not firewalled). ");
                mesg.append(
                    "Also make sure that the server has not been started "
                    + "with the --skip-networking ");
                mesg.append("flag.\n\n");
            } else {
                mesg.append("Unable to connect to database.");
            mesg.append("Underlying exception: \n\n");
            mesg.append(ex.getClass().getName());
            throw new java.sql.SQLException(mesg.toString(), "08S01");
     * If a connection is in auto-commit mode, than all its SQL
     * statements will be executed and committed as individual
     * transactions.  Otherwise, its SQL statements are grouped
     * into transactions that are terminated by either commit()
     * or rollback().  By default, new connections are in auto-
     * commit mode.  The commit occurs when the statement completes
     * or the next execute occurs, whichever comes first.  In the
     * case of statements returning a ResultSet, the statement
     * completes when the last row of the ResultSet has been retrieved
     * or the ResultSet has been closed.  In advanced cases, a single
     * statement may return multiple results as well as output parameter
     * values.  Here the commit occurs when all results and output param
     * values have been retrieved.
     * <p><b>Note:</b> MySQL does not support transactions, so this
     *                 method is a no-op.
     * @param autoCommit - true enables auto-commit; false disables it
     * @exception java.sql.SQLException if a database access error occurs
    public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = { new Boolean(autoCommit) };
            Debug.methodCall(this, "setAutoCommit", args);
        checkClosed();
        if (this.transactionsSupported) {
            // this internal value must be set first as failover depends on it
            // being set to true to fail over (which is done by most
            // app servers and connection pools at the end of
            // a transaction), and the driver issues an implicit set
            // based on this value when it (re)-connects to a server
            // so the value holds across connections
            this.autoCommit = autoCommit;
            String sql = "SET autocommit=" + (autoCommit ? "1" : "0");
            execSQL(sql, -1, this.database);
        } else {
            if ((autoCommit == false) && (this.relaxAutoCommit == false)) {
                throw new SQLException("MySQL Versions Older than 3.23.15 "
                    + "do not support transactions", "08003");
            } else {
                this.autoCommit = autoCommit;
        return;
     * gets the current auto-commit state
     * @return Current state of the auto-commit mode
     * @exception java.sql.SQLException (why?)
     * @see setAutoCommit
    public boolean getAutoCommit() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "getAutoCommit", args);
            Debug.returnValue(this, "getAutoCommit",
                new Boolean(this.autoCommit));
        return this.autoCommit;
     * A sub-space of this Connection's database may be selected by
     * setting a catalog name.  If the driver does not support catalogs,
     * it will silently ignore this request
     * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
     * @param catalog the database for this connection to use
     * @throws java.sql.SQLException if a database access error occurs
    public void setCatalog(String catalog) throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = { catalog };
            Debug.methodCall(this, "setCatalog", args);
        checkClosed();
        String quotedId = this.dbmd.getIdentifierQuoteString();
        if ((quotedId == null) || quotedId.equals(" ")) {
            quotedId = "";
        StringBuffer query = new StringBuffer("USE ");
        query.append(quotedId);
        query.append(catalog);
        query.append(quotedId);
        execSQL(query.toString(), -1, catalog);
        this.database = catalog;
     * Return the connections current catalog name, or null if no
     * catalog name is set, or we dont support catalogs.
     * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
     * @return the current catalog name or null
     * @exception java.sql.SQLException if a database access error occurs
    public String getCatalog() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "getCatalog", args);
            Debug.returnValue(this, "getCatalog", this.database);
        return this.database;
     * DOCUMENT ME!
     * @return DOCUMENT ME!
    public boolean isClosed() {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "isClosed", args);
            Debug.returnValue(this, "isClosed", new Boolean(this.isClosed));
        return this.isClosed;
     * Returns the character encoding for this Connection
     * @return the character encoding for this connection.
    public String getEncoding() {
        return this.encoding;
     * @see Connection#setHoldability(int)
    public void setHoldability(int arg0) throws SQLException {
        // do nothing
     * @see Connection#getHoldability()
    public int getHoldability() throws SQLException {
        return ResultSet.CLOSE_CURSORS_AT_COMMIT;
     * NOT JDBC-Compliant, but clients can use this method
     * to determine how long this connection has been idle.
     * This time (reported in milliseconds) is updated once
     * a query has completed.
     * @return number of ms that this connection has
     * been idle, 0 if the driver is busy retrieving results.
    public long getIdleFor() {
        if (this.lastQueryFinishedTime == 0) {
            return 0;
        } else {
            long now = System.currentTimeMillis();
            long idleTime = now - this.lastQueryFinishedTime;
            return idleTime;
     * Should we tell MySQL that we're an interactive client
     * @return true if isInteractiveClient was set to true.
    public boolean isInteractiveClient() {
        return isInteractiveClient;
     * A connection's database is able to provide information describing
     * its tables, its supported SQL grammar, its stored procedures, the
     * capabilities of this connection, etc.  This information is made
     * available through a DatabaseMetaData object.
     * @return a DatabaseMetaData object for this connection
     * @exception java.sql.SQLException if a database access error occurs
    public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException {
        checkClosed();
        return new DatabaseMetaData(this, this.database);
     * You can put a connection in read-only mode as a hint to enable
     * database optimizations
     * <B>Note:</B> setReadOnly cannot be called while in the middle
     * of a transaction
     * @param readOnly - true enables read-only mode; false disables it
     * @exception java.sql.SQLException if a database access error occurs
    public void setReadOnly(boolean readOnly) throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = { new Boolean(readOnly) };
            Debug.methodCall(this, "setReadOnly", args);
            Debug.returnValue(this, "setReadOnly", new Boolean(readOnly));
        checkClosed();
        this.readOnly = readOnly;
     * Tests to see if the connection is in Read Only Mode.  Note that
     * we cannot really put the database in read only mode, but we pretend
     * we can by returning the value of the readOnly flag
     * @return true if the connection is read only
     * @exception java.sql.SQLException if a database access error occurs
    public boolean isReadOnly() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "isReadOnly", args);
            Debug.returnValue(this, "isReadOnly", new Boolean(this.readOnly));
        return this.readOnly;
     * @see Connection#setSavepoint()
    public java.sql.Savepoint setSavepoint() throws SQLException {
        throw new NotImplemented();
     * @see Connection#setSavepoint(String)
    public java.sql.Savepoint setSavepoint(String arg0)
        throws SQLException {
        throw new NotImplemented();
     * DOCUMENT ME!
     * @return DOCUMENT ME!
    public TimeZone getServerTimezone() {
        return this.serverTimezone;
     * DOCUMENT ME!
     * @param level DOCUMENT ME!
     * @throws java.sql.SQLException DOCUMENT ME!
    public void setTransactionIsolation(int level) throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = { new Integer(level) };
            Debug.methodCall(this, "setTransactionIsolation", args);
        checkClosed();
        if (this.hasIsolationLevels) {
            StringBuffer sql = new StringBuffer(
                    "SET SESSION TRANSACTION ISOLATION LEVEL ");
            switch (level) {
            case java.sql.Connection.TRANSACTION_NONE:
                throw new SQLException("Transaction isolation level "
                    + "NONE not supported by MySQL");
            case java.sql.Connection.TRANSACTION_READ_COMMITTED:
                sql.append("READ COMMITTED");
                break;
            case java.sql.Connection.TRANSACTION_READ_UNCOMMITTED:
                sql.append("READ UNCOMMITTED");
                break;
            case java.sql.Connection.TRANSACTION_REPEATABLE_READ:
                sql.append("REPEATABLE READ");
                break;
            case java.sql.Connection.TRANSACTION_SERIALIZABLE:
                sql.append("SERIALIZABLE");
                break;
            default:
                throw new SQLException("Unsupported transaction "
                    + "isolation level '" + level + "'", "S1C00");
            execSQL(sql.toString(), -1, this.database);
            isolationLevel = level;
        } else {
            throw new java.sql.SQLException("Transaction Isolation Levels are "
                + "not supported on MySQL versions older than 3.23.36.", "S1C00");
     * Get this Connection's current transaction isolation mode.
     * @return the current TRANSACTION_* mode value
     * @exception java.sql.SQLException if a database access error occurs
    public int getTransactionIsolation() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "getTransactionIsolation", args);
            Debug.returnValue(this, "getTransactionIsolation",
                new Integer(isolationLevel));
        if (this.hasIsolationLevels) {
             java.sql.Statement stmt = null;
             java.sql.ResultSet rs = null;
             try {
                  stmt = this.createStatement();
                  String query = null;
                  if (this.io.versionMeetsMinimum(4, 0, 3)) {
                       query = "SHOW VARIABLES LIKE 'tx_isolation'";
                  } else {
                       query = "SHOW VARIABLES LIKE 'transaction_isolation'";
                  rs = stmt.executeQuery(query);
                  if (rs.next()) {
                       String s = rs.getString(2);
                       if (s != null) {
                              Integer intTI = (Integer) mapTransIsolationName2Value.get(s);
                              if (intTI != null) {
                                   return intTI.intValue();
                       throw new SQLException("Could not map transaction isolation '" + s + " to a valid JDBC level.", "S1000");
                  } else {
                       throw new SQLException("Could not retrieve transaction isolation level from server", "S1000");
             } finally {
                  if (rs != null) {
                       try {
                            rs.close();
                       } catch (Exception ex) {
                            // ignore
                       rs = null;
                  if (stmt != null) {
                       try {
                            stmt.close();
                       } catch (Exception ex) {
                            // ignore
                       stmt = null;
        return isolationLevel;
     * JDBC 2.0
     * Install a type-map object as the default type-map for
     * this connection
     * @param map the type mapping
     * @throws SQLException if a database error occurs.
    public void setTypeMap(java.util.Map map) throws SQLException {
        this.typeMap = map;
     * JDBC 2.0
     * Get the type-map object associated with this connection.
     * By default, the map returned is empty.
     * @return the type map
     * @throws SQLException if a database error occurs
    public synchronized java.util.Map getTypeMap() throws SQLException {
        if (this.typeMap == null) {
            this.typeMap = new HashMap();
        return this.typeMap;
     * The first warning reported by calls on this Connection is
     * returned.
     * <B>Note:</B> Sebsequent warnings will be changed to this
     * java.sql.SQLWarning
     * @return the first java.sql.SQLWarning or null
     * @exception java.sql.SQLException if a database access error occurs
    public java.sql.SQLWarning getWarnings() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "getWarnings", args);
            Debug.returnValue(this, "getWarnings", null);
        return null;
     * Allow use of LOAD LOCAL INFILE?
     * @return true if allowLoadLocalInfile was set to true.
    public boolean allowLoadLocalInfile() {
        return this.allowLoadLocalInfile;
     * DOCUMENT ME!
     * @return DOCUMENT ME!
    public boolean capitalizeDBMDTypes() {
        return this.capitalizeDBMDTypes;
     * After this call, getWarnings returns null until a new warning
     * is reported for this connection.
     * @exception java.sql.SQLException if a database access error occurs
    public void clearWarnings() throws java.sql.SQLException {
        if (Driver.TRACE) {
            Object[] args = new Object[0];
            Debug.methodCall(this, "clearWarnings", args);
        // firstWarning = null;
     * In some cases, it is desirable to immediately release a Connection's
     * database and JDBC resources instead of waiting for them to be
     * automatically released (                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

Similar Messages

  • Com.mysql.jdbc.PacketTooBigException when creating a DB Table resource

    Hellos.
    I am trying to add an Oracle Database Table resource to my IDM 6.0 system.
    On the the last screen of the wizard, when I save my details, I see this error in red:
    ==> com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1340540 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
    I have a mysql repository and use Tomcat 4.1 (on Windows).
    Questions...
    What file do I edit?
    Do I add this parameter.. if so what value do I use?
    Who else has seen this?
    thanks.. GF

    You need to change "my.ini" file for MySQL, usualy it is in windows folder.
    Change the value of 'max_allowed_packet' in my.ini file to some thing like 16M.
    I hope it helps..
    --Vipul                                                                                                                                                                                                                                                                                                                                                                           

  • JDBC Driver (HELP NEEDED URGENTLY)

    Hi, I'm a student who has a project to be done on java.
    I would like to use access or some other db tt is plafform independence.
    However, I do not know of such a dbms system. Can someone help me by telling me with access can be used on other plafform or there is a better dbms out there?
    Also , is there any way the client can just do installation without using jdbc to odbc bridge as the installion of the application should be easy and do not require the client to do install addition stuff or trouble themselve over the installtion of the software. Your help is greatly needed Thank you.

    I assume you meant "db that is platform independent."
    Try http://postgresql.org or http://mysql.org. Both
    are free, open source and well supported. And nearly
    anything is 'better' than Access. Not sure about the
    second part of your query.Message:
    Thanks for the tip man. The second problem i have is that i m trying to create a program that run on stand alone PC . It must be able to access a database. However, using the odbc bridge means that it is not plafform indepence while is one of the aim i have for the program. Is it possible to find a driver that dont need to the odbc and can run on standalone PC without a server between there?
    thanks you for all your help!!!

  • Help with com.mysql.jdbc.Driver

    Hi all
    I am new to working with java. I am working off of my laptop (pc -vista) and
    am trying to connect to a database on a server I have, mac osx 10.x.
    First question: I would install com.mysql.jdbc.Driver on the same server as
    the MySql server correct?
    Second and more important question: I have multiple pages
    printed out on installing this driver but I just cannot follow it. I am not
    very good in terminal(mac) and the install seems terminal based.
    Can someone please try to explain to me in laymen terms what needs to
    be done?
    thanks alot
    Marcus

    marcusam wrote:
    sorry for my lack of knowledge
    client code = all on one machine?No, client code = the code you use to access your DB server.
    >
    I wanted to access a database that was on a totally different machine, with a java application.
    is this not very doable - or realistic?
    It's completely doable.
    i found enviroment variables for CLASSPATH that are pointing inside 'jre1.6.0_07'
    but i also have 'jdk1.6.0_07' - should the development kit be the one i use? - sorry
    back to original question - so would i just move the .jar file into
    \jre1.6.0_02\lib\ext\ or something of that sort
    thanks alot
    MarcusYes, you can move the jar into the ext directory if you wish. How are you running your java application? What are you typing/clicking on?

  • Help! JSP w/ struts can't find Class.forName("com.mysql.jdbc.Driver")

    I think this is just a directory structure issue but I can't figure it out. I am writing a JSP / Struts / MYSQL web application which uses the mysql JDBC connector. The connector (mysql-connector-java-5.1.6-bin.jar) is in the referenced libraries. If I write the line of code:
    Class.forName("com.mysql.jdbc.Driver");
    To load up the driver, it works in JSP files in the folder /projectname/webroot/web-inf just fine and I can go on to execute MySQL queries. However, I need to load up the driver in an action (.java action) with the directory structure /projectname/src/action and it throws the exception "class not found", I believe, it can no longer seem to get to the driver. Can anyone tell me how to resolve this problem?
    Thanks in advance, I hope this is the correct place (I have done my best to find the right one).
    Edited by: Arkanin on Apr 24, 2008 4:39 PM

    Arkanin wrote:
    I think this is just a directory structure issue but I can't figure it out. I am writing a JSP / Struts / MYSQL web application which uses the mysql JDBC connector. The connector (mysql-connector-java-5.1.6-bin.jar) is in the referenced libraries. Nope, it's not. I don't know what "referenced libraries" means. It has to be in CLASSPATH, and that isn't an environment variable.
    If I write the line of code:
    Class.forName("com.mysql.jdbc.Driver"); No, wrong.
    The JAR file for the Driver class might go in the WEB-INF/lib of your web app. If you're using Tomcat 5.5.26, put it in common/lib.
    %

  • Help me with this  one:java.lang.ClassNotFoundException: com.mysql.jdbc.Dri

    compile and build:Successful
    but when I run it...I got this msg:
    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Administrator\Form\build\classes
    compile:
    run:
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at my.form.MyDBConnection.init(MyDBConnection.java:26)
    at my.form.FormUI.<init>(FormUI.java:20)
    at my.form.FormUI$40.run(FormUI.java:1094)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)
    I use two classes
    FormUI.java and MyDBConnection.java
    * MyDBConnection.java
    package my.form;
    import java.sql.*;
    public class MyDBConnection {
    private Connection myConnection;
    /** Creates a new instance of MyDBConnection */
    public MyDBConnection() {
    public void init(){
    Connection connection = null;
    Statement statement = null;
    try{
    Class.forName("com.mysql.jdbc.Driver");
    myConnection=DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/test,'root' "
    catch(SQLException sqlException){
    sqlException.printStackTrace();
    System.exit(1);
    catch ( ClassNotFoundException classNotFound )
    classNotFound.printStackTrace();
    System.exit(1);
    finally
    try
    statement.close();
    connection.close();
    catch ( Exception exception )
    exception.printStackTrace();
    System.exit( 1 );
    public Connection getMyConnection(){
    return myConnection;
    public void close(ResultSet rs){
    if(rs !=null){
    try{
    rs.close();
    catch(Exception e){}
    public void close(java.sql.Statement stmt){
    if(stmt !=null){
    try{
    stmt.close();
    catch(Exception e){}
    public void destroy(){
    if(myConnection !=null){
    try{
    myConnection.close();
    catch(Exception e){}
    * FormUI.java
    * Created on May 2, 2007, 10:33 AM
    package my.form;
    import java.sql.*;
    * @author Administrator
    public class FormUI extends javax.swing.JFrame {
    /** Creates new form FormUI */
    public FormUI() throws Exception {
    mdbc=new MyDBConnection();
    mdbc.init();
    Connection conn=mdbc.getMyConnection();
    stmt=conn.createStatement();
    initComponents();
    * MyDBConnection.java
    /** 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.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jTextField3 = new javax.swing.JTextField();
    jTextField35 = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    jTextField5 = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    jTextField6 = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jTextField7 = new javax.swing.JTextField();
    jLabel8 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jLabel9 = new javax.swing.JLabel();
    jTextField8 = new javax.swing.JTextField();
    jLabel10 = new javax.swing.JLabel();
    jTextField9 = new javax.swing.JTextField();
    jLabel11 = new javax.swing.JLabel();
    jTextField10 = new javax.swing.JTextField();
    jLabel12 = new javax.swing.JLabel();
    jTextField11 = new javax.swing.JTextField();
    jLabel13 = new javax.swing.JLabel();
    jTextField12 = new javax.swing.JTextField();
    jLabel14 = new javax.swing.JLabel();
    jTextField13 = new javax.swing.JTextField();
    jLabel15 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jLabel16 = new javax.swing.JLabel();
    jTextField14 = new javax.swing.JTextField();
    jLabel17 = new javax.swing.JLabel();
    jTextField15 = new javax.swing.JTextField();
    jLabel18 = new javax.swing.JLabel();
    jTextField16 = new javax.swing.JTextField();
    jLabel19 = new javax.swing.JLabel();
    jTextField17 = new javax.swing.JTextField();
    jLabel20 = new javax.swing.JLabel();
    jTextField18 = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jTextField19 = new javax.swing.JTextField();
    jLabel22 = new javax.swing.JLabel();
    jTextField20 = new javax.swing.JTextField();
    jLabel23 = new javax.swing.JLabel();
    jTextField21 = new javax.swing.JTextField();
    jLabel24 = new javax.swing.JLabel();
    jTextField22 = new javax.swing.JTextField();
    jLabel25 = new javax.swing.JLabel();
    jTextField23 = new javax.swing.JTextField();
    jLabel26 = new javax.swing.JLabel();
    jTextField24 = new javax.swing.JTextField();
    jLabel27 = new javax.swing.JLabel();
    jTextField25 = new javax.swing.JTextField();
    jLabel28 = new javax.swing.JLabel();
    jTextField26 = new javax.swing.JTextField();
    jLabel29 = new javax.swing.JLabel();
    jTextField27 = new javax.swing.JTextField();
    jLabel30 = new javax.swing.JLabel();
    jTextField28 = new javax.swing.JTextField();
    jLabel31 = new javax.swing.JLabel();
    jTextField29 = new javax.swing.JTextField();
    jLabel32 = new javax.swing.JLabel();
    jTextField30 = new javax.swing.JTextField();
    jLabel33 = new javax.swing.JLabel();
    jTextField31 = new javax.swing.JTextField();
    jLabel34 = new javax.swing.JLabel();
    jTextField32 = new javax.swing.JTextField();
    jLabel35 = new javax.swing.JLabel();
    jTextField33 = new javax.swing.JTextField();
    jLabel36 = new javax.swing.JLabel();
    jTextField34 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel37 = new javax.swing.JLabel();
    jLabel38 = new javax.swing.JLabel();
    jTextField37 = new javax.swing.JTextField();
    jTextField36 = new javax.swing.JTextField();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jPanel1.setBackground(new java.awt.Color(204, 255, 204));
    jLabel1.setText("custID");
    jLabel2.setText("PIN");
    jLabel3.setText("Source");
    jLabel4.setText("SaleDate");
    jTextField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField1ActionPerformed(evt);
    jTextField2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField2ActionPerformed(evt);
    jTextField3.setText("SourceHub");
    jTextField3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField3ActionPerformed(evt);
    jTextField35.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField35ActionPerformed(evt);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(28, 28, 28)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel1)
    .addComponent(jLabel2))
    .addGap(15, 15, 15)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)
    .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel3)
    .addComponent(jLabel4))
    .addGap(13, 13, 13)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField35)
    .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE))
    .addGap(198, 198, 198))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(21, 21, 21)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel1)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel3))
    .addGap(18, 18, 18)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel2)
    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel4)
    .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(23, Short.MAX_VALUE))
    jPanel3.setBackground(new java.awt.Color(204, 255, 204));
    jLabel5.setText("First Name");
    jTextField5.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField5ActionPerformed(evt);
    jLabel6.setText("Last Name");
    jTextField6.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField6ActionPerformed(evt);
    jLabel7.setText("Address");
    jTextField7.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField7ActionPerformed(evt);
    jLabel8.setText("City");
    jTextField4.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField4ActionPerformed(evt);
    jLabel9.setText("ZIP");
    jTextField8.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField8ActionPerformed(evt);
    jLabel10.setText("Sales Rep");
    jTextField9.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField9ActionPerformed(evt);
    jLabel11.setText("Phone");
    jTextField10.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField10ActionPerformed(evt);
    jLabel12.setText("Alt Phone");
    jTextField11.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField11ActionPerformed(evt);
    jLabel13.setText("E-Mail");
    jTextField12.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField12ActionPerformed(evt);
    jLabel14.setText("DateofBirth");
    jTextField13.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField13ActionPerformed(evt);
    jPanel2.setBackground(new java.awt.Color(204, 255, 204));
    jLabel16.setText("AnnualAmount");
    jTextField14.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField14ActionPerformed(evt);
    jLabel17.setText("AnnualDay");
    jTextField15.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField15ActionPerformed(evt);
    jLabel18.setText("AnnualMonth");
    jTextField16.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField16ActionPerformed(evt);
    jLabel19.setText("MonthlyAmount");
    jTextField17.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField17ActionPerformed(evt);
    jLabel20.setText("MonthlyDay");
    jTextField18.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField18ActionPerformed(evt);
    jLabel21.setText("MonthlyStatusDate");
    jTextField19.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField19ActionPerformed(evt);
    jLabel22.setText("AnnualStatus2");
    jTextField20.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField20ActionPerformed(evt);
    jLabel23.setText("MonthlyStatus2");
    jTextField21.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField21ActionPerformed(evt);
    jLabel24.setText("Plan");
    jTextField22.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField22ActionPerformed(evt);
    jLabel25.setText("Bonus Gift");
    jTextField23.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField23ActionPerformed(evt);
    jLabel26.setText("AccountType");
    jTextField24.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField24ActionPerformed(evt);
    jLabel27.setText("AbaNumber");
    jTextField25.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField25ActionPerformed(evt);
    jLabel28.setText("AccountNumber");
    jTextField26.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField26ActionPerformed(evt);
    jLabel29.setText("BankName");
    jTextField27.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField27ActionPerformed(evt);
    jLabel30.setText("Verification Number");
    jTextField28.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField28ActionPerformed(evt);
    jLabel31.setText("Upsale1");
    jTextField29.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField29ActionPerformed(evt);
    jLabel32.setText("Upsale2");
    jTextField30.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField30ActionPerformed(evt);
    jLabel33.setText("UP1BillDate");
    jTextField31.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField31ActionPerformed(evt);
    jLabel34.setText("UP2BillDate");
    jTextField32.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField32ActionPerformed(evt);
    jLabel35.setText("Date-Time");
    jTextField33.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField33ActionPerformed(evt);
    jLabel36.setText("Notes");
    jTextField34.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField34ActionPerformed(evt);
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel16)
    .addComponent(jLabel19)
    .addComponent(jLabel22)))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(34, 34, 34)
    .addComponent(jLabel24))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel26))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(23, 23, 23)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel29)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(2, 2, 2)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel31)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel35)
    .addComponent(jLabel33)))))))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField24)
    .addComponent(jTextField22)
    .addComponent(jTextField20)
    .addComponent(jTextField17)
    .addComponent(jTextField14, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel17)
    .addComponent(jLabel20))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField18)
    .addComponent(jTextField15, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel18)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel21)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel27)
    .addComponent(jLabel25)
    .addComponent(jLabel23))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField25)
    .addComponent(jTextField23)
    .addComponent(jTextField21, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel28)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField26))))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jTextField31, javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField29, javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField27, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE))
    .addGap(21, 21, 21)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel30)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel34)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(14, 14, 14)
    .addComponent(jTextField34, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))))
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel32)
    .addGap(20, 20, 20)
    .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(27, 27, 27)
    .addComponent(jLabel36)))
    .addGap(113, 11

    I am not sure what is the driver for mysql. I just came across the similar kind of problem in the forum and I have given the forum link below. Check if you have the file and then set the classpath.
    [Hyperlinks] http://forum.java.sun.com/thread.jspa?threadID=522873&messageID=2503366
    [HyperLinks]

  • Java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)

    Hi,All
    Need Help regarding the exception.
    As i tried so many way to solve this problem but cound'nt find out the solution.!!! If i restart the server then this error is resolved but for the some time.,after 4-5 hour again i need to restart the server.
    so please help me out from this problem!!!!!!
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: #{cityf.OrderToConsumerCity}: javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:225)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
    root cause
    javax.faces.FacesException: #{cityf.OrderToConsumerCity}: javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         javax.faces.component.UICommand.broadcast(UICommand.java:332)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
    root cause
    javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
         com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         javax.faces.component.UICommand.broadcast(UICommand.java:332)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
    root cause
    org.hibernate.exception.JDBCConnectionException: could not execute query
         org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
         org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
         org.hibernate.loader.Loader.doList(Loader.java:2223)
         org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         org.hibernate.loader.Loader.list(Loader.java:2099)
         org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         com.etelic.dao.ConsumerDAOHibernate.getCityList(ConsumerDAOHibernate.java:153)
         com.etelic.controller.City.OrderToConsumerCity(City.java:286)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         java.lang.reflect.Method.invoke(Unknown Source)
         com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         javax.faces.component.UICommand.broadcast(UICommand.java:332)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
    root cause
    com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:
    ** BEGIN NESTED EXCEPTION **
    com.mysql.jdbc.CommunicationsException
    MESSAGE: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
         at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
         at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
         at org.hibernate.loader.Loader.doQuery(Loader.java:674)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.doList(Loader.java:2220)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         at org.hibernate.loader.Loader.list(Loader.java:2099)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
         at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
         at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
         at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 15 ms ago.
    STACKTRACE:
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    *java.io.EOFException*
    *     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)*     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
         at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
         at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
         at org.hibernate.loader.Loader.doQuery(Loader.java:674)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.doList(Loader.java:2220)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         at org.hibernate.loader.Loader.list(Loader.java:2099)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
         at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
         at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
         at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 15 ms ago.
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2579)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
         at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
         at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
         at org.hibernate.loader.Loader.doQuery(Loader.java:674)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.doList(Loader.java:2220)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         at org.hibernate.loader.Loader.list(Loader.java:2099)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
         at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
         at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
         at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    ** END NESTED EXCEPTION **
         com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
         com.mysql.jdbc.Connection.checkClosed(Connection.java:1931)
         com.mysql.jdbc.Connection.prepareStatement(Connection.java:4720)
         com.mysql.jdbc.Connection.prepareStatement(Connection.java:4686)
         org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
         org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
         org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
         org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
         org.hibernate.loader.Loader.doQuery(Loader.java:673)
         org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         org.hibernate.loader.Loader.doList(Loader.java:2220)
         org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         org.hibernate.loader.Loader.list(Loader.java:2099)
         org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         com.etelic.dao.ConsumerDAOHibernate.getCityList(ConsumerDAOHibernate.java:153)
         com.etelic.controller.City.OrderToConsumerCity(City.java:286)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         java.lang.reflect.Method.invoke(Unknown Source)
         com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         javax.faces.component.UICommand.broadcast(UICommand.java:332)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
         org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
    Apache Tomcat/6.0.14-Thanks and regards
    Praveen Soni

    Hey BalusC
    As i already obtain a new session object from sessionfactory,for one or more transactions at once(!),
    For reference see below code:
    package com.dao>hibenateUtil;
    import java.util.*;
    import com.ConsumerRecord;
    public class ConsumerDAOHibernate implements IConsumerDAO {
         public Long getNumberMatchingQuery(ConsumerRecord upr){
             String query = new String();
            String queryStart = "select count(*) FROM person in CLASS com.ConsumerRecord";
            query += queryStart;
            org.hibernate.Query q = HibernateUtil.getSession().createQuery(query);
            return (Long)q.uniqueResult();
        public Long getNumberMatchingCity(ConsumerRecord upr){
             String query = new String();
            String queryStart = "select count(*) FROM city in CLASS com.ConsumerRecord";
            query += queryStart;
            org.hibernate.Query q = HibernateUtil.getSession().createQuery(query);
            return (Long)q.uniqueResult();
    Hibernate Util:-package com.dao;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import org.apache.log4j.Logger;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    public class HibernateUtil {
        private static final SessionFactory sessionFactory;
        private static Session  session = null;
        private static Logger logger = Logger.getLogger(HibernateUtil.class.getName());
        static {
            try {
                /** TODO: change to IOC w/ datasource */
                Configuration conf = new Configuration();
                sessionFactory = conf.configure().buildSessionFactory();
            } catch (Throwable ex) {
                // Make sure you log the exception, as it might be swallowed
                System.err.println("Initial SessionFactory creation failed." + ex);
                throw new ExceptionInInitializerError(ex);
        public static Session getSession() {
            if(session == null){
                try {
                    session = sessionFactory.openSession();   
                    logger.debug("****************************new session being created**************************************");
                               //sessionFactory.
                } catch (Throwable ex) {
                    // Make sure you log the exception, as it might be swallowed
                    System.err.println("Initial SessionFactory creation failed." + ex);
                    throw new ExceptionInInitializerError(ex);
            return session;
        }

  • Error in Class.forName("com.mysql.jdbc.driver")

    Hi forum,
    Please help me to solve the issue.
    im using the following jsp code for genrating the reports using JASPER REPORTS
    the JSP FILE
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="javax.sql.DataSource"%>
    <%@ page import="javax.naming.InitialContext"%>
    <%@ page import="net.sf.jasperreports.engine.*"%>
    <%@ page import="net.sf.jasperreports.engine.design.JasperDesign"%>
    <%@ page import="net.sf.jasperreports.engine.xml.JRXmlLoader"%>
    <%@ page import="net.sf.jasperreports.engine.export.*" %>
    <%@ page import ="net.sf.jasperreports.engine.*"%>
    <%@ page import ="net.sf.jasperreports.engine.JasperFillManager"%>
    <%@ page import ="net.sf.jasperreports.engine.JRException"%>
    <%@ page import="net.sf.jasperreports.engine.JasperReport"%>
    <%@ page import="net.sf.jasperreports.engine.JasperPrint"%>
    <html>
    <body bgcolor="00ffcc">
    <%
    try{
    Connection con = null;
    String url="jdbc:mysql://localhost/customer";
    String username = "root";
    String password = "cmsadmin";
    InputStream input=new FileInputStream(new File("C:/Documents and Settings/user/My Documents/NetBeansProjects/jasperreports/web/helloworld.xml"));
    JasperDesign design = JRXmlLoader.load(input);
    JasperReport report = JasperCompileManager.compileReport(design);
    Map params = new HashMap();
    params.put("reportTitle", "helloworld");
    params.put("author", "Muthu Kumar");
    params.put("startDate", (new java.util.Date()).toString());
    params.put("ReportTitle", "PDF JasperReport");
    <img class="emoticon" src="images/emoticons/confused.gif" border="0" alt="" />Class.forName("com.mysql.jdbc.Driver");<img class="emoticon" src="images/emoticons/confused.gif" border="0" alt="" /><img src="images/emoticons/confused.gif" border="0" alt="" />
    con = DriverManager.getConnection(url,username,password);
    JasperPrint print = JasperFillManager.fillReport(report, params, con);
    OutputStream output=new FileOutputStream(new File("C:/Documents and Settings/user/My Documents/NetBeansProjects/jasperreports/helloreportworld.pdf"));
    JasperExportManager.exportReportToPdfStream(print, output);
    // JasperViewer.viewReport(print);
    catch(SQLException es) {
    out.println(es);
    catch(JRException ex){
    //ex.printStackTrace();
    out.println(ex);
    %>
    </body>
    </html>The error it is saying is in the line Class.forName(....) ;
    Please look for the emoctions with question mark
    i DOn know what to do.
    Please help
    Im comparin the below JRXML file as with the above code
    <?xml version="1.0"?>
    <!DOCTYPE jasperReport
    PUBLIC "-//JasperReports//DTD Report Design//EN"
    "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport name="helloworld">
    <parameter name="reportTitle" class="java.lang.String"/>
    <parameter name="author" class="java.lang.String"/>
    <parameter name="startDate" class="java.lang.String"/>
    <queryString>
    <![CDATA[SELECT * FROM customer order by UserID ]]>
    </queryString>
    <field name="UserID" class="java.lang.String"/>
    <field name="UserName" class="java.lang.String"/>
    <field name="City" class="java.lang.String"/>
    <field name="State" class="java.lang.String"/>
    <title>
    <band height="60">
    <textField>
    <reportElement x="0" y="10" width="500" height="40"/>
    <textElement textAlignment="Center">
    <font size="24"/>
    </textElement>
    <textFieldExpression class="java.lang.String">
    <![CDATA[$P{reportTitle}]]>
    </textFieldExpression>
    </textField>
    <textField>
    <reportElement x="0" y="40" width="500" height="20"/>
    <textElement textAlignment="Center"/>
    <textFieldExpression class="java.lang.String">
    <![CDATA["Run by: " + $P{author}
    + " on " + $P{startDate}]]>
    </textFieldExpression>
    </textField>
    </band>
    </title>
    <columnHeader>
    <band height="30">
    <rectangle>
    <reportElement x="0" y="0" width="500" height="25"/>
    <graphicElement/>
    </rectangle>
    <staticText>
    <reportElement x="5" y="5" width="50" height="15"/>
    <textElement/>
    <text><![CDATA[UserID]]></text>
    </staticText>
    <staticText>
    <reportElement x="55" y="5" width="150" height="15"/>
    <text><![CDATA[UserName]]></text>
    </staticText>
    <staticText>
    <reportElement x="205" y="5" width="255" height="15"/>
    <text><![CDATA[City, State]]></text>
    </staticText>
    </band>
    </columnHeader>
    <detail>
    <band height="20">
    <textField>
    <reportElement x="5" y="0" width="50" height="15"/>
    <textElement/>
    <textFieldExpression class="java.lang.String">
    <![CDATA[$F{UserID}]]>
    </textFieldExpression>
    </textField>
    <textField>
    <reportElement x="55" y="0" width="150" height="15"/>
    <textElement/>
    <textFieldExpression class="java.lang.String">
    <![CDATA[$F{UserName}]]>
    </textFieldExpression>
    </textField>
    <textField>
    <reportElement x="205" y="0" width="255" height="15"/>
    <textElement/>
    <textFieldExpression class="java.lang.String">
    <![CDATA[$F{City} + ", " + $F{State}]]>
    </textFieldExpression>
    </textField>
    </band>
    </detail>
    </jasperReport>

    Glass_Fish wrote:
    I have set the classpath in the environment variables in the my computer properties.The web container has it's own properties. The "system" classpath means absolutely nothing to it. Read your server's documentation.

  • Mysql show result-- com.mysql.jdbc.NotImplemented: Feature not implemented

    Hello,
    I have set a database and I am trying to show a simple select.I have this code for example:
    String SQL = "SELECT * FROM DatabaseName.tableName";
                         stmt = (Statement) conn.createStatement();
                         rs = (ResultSet) stmt.executeQuery(SQL);
                         while (rs.next()) {
                            System.out.println(rs.getArray(3));
                         }And all I get is an exception:
    com.mysql.jdbc.NotImplemented: Feature not implemented
    at com.mysql.jdbc.ResultSet.getArray(ResultSet.java:1043)
    Is this right?I have tried other methods but I get the above.How to show the result.
    It is in 3rd column double value.

    Are you guys always this cranky? Who's cranky? It's important for the integrity of these forums that misinformation isn't left lying around uncorrected. If that makes you cranky, try elsewhere where the standards may not be so high.
    I posted something that works, now is it exactly as whatever getArray does?No.
    Probably not.Just a minute. You said here that 'the work around code' is something like this, and here that 'it actually is the same result'. You were mistaken. Twice. You are now in the process of changing your mind. Let me help you. It is definitely not exactly what getArray() does. Not even close. Completely different. getArray() gets an array directly from the database from a single column in the current row in the result set. Your code constructs an array from a single column across all rows in the result set. There is no comparison.
    What's wrong with helping outWhat's wrong with getting it right? What's wrong with pointing out an error? What's wrong with admitting when you're mistaken? What's wrong with alerting the OP not to mention all future readers of this thread that it contains misinformation? What's wrong with you finding out that you were wrong?
    and posting what you think it should say
    rather than just being negative?As a matter of fact nobody was 'just negative'. I pointed out exactly what the difference between your code and getArray() is. But by 'negative' do you mean pointing out that you were wrong? Nothing wrong with that.

  • Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    Hi All,
    I want to connect to a stored procedure that is on mySQL database via BPEL and Jdeveloper 11.1.1.5
    The version of the MySQL database:
    mysqld Ver 5.1.53
    I am using the following driver :
    mysql-connector-java-5.1.25-bin
    I have pointed my JDeveloper to the new driver
    By doing the following :
    JDeveloper > Tools > Manage Libraries > ...
    When I test the connection it give me a success.
    In creating a new BPEL partnerlink - DatabaseAdapter with the new Connection to the MySQL and it seems to work, when I want to select from a table.
    But when I use the option Call stored procedure or function, using the schema aci. I can see the stored procedure aci_insert but when I want to select it, I am getting the following:
    An Error occured while obtaining arguments/source code for the selected stored procedure. Verify that the database connection is valid.
    Details :
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'parameters' in information_schema
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    I am selecting the aci schema, but do not know why it keep on refering to information_schema

    Seems I miss something.
    IS there only two MySQL schema ?
    One to set up from sql file from Higgins server, the other is
    automatically set up by rpps-axis. I have both schema, maybe the one from
    Higgins is not uptodate (but I think it is). Or maybe I have to set up an
    other table but I didn't read about it.
    PS :
    There is some errors with eclipse componment. It's needed to had in
    rpps-axis/WEB-INF/lib/ the following files :
    org.eclipse.runtime.IExtensionRegistry
    org.eclipse.core.runtime
    org.eclipse.equinox.common
    org.eclipse.osgi
    Don't know if needed to work.

  • Com.mysql.jdbc.driver and jdbc:odbc bridge driver

    Hi All,
    I want to update mysql database from data in hashtable. My application already uses JDBC:OBDC bridge driver for retrieving data from excel sheet and putting in hashtable.
    For connecting to mysql i need to use com.mysql.jdbc.driver too in the same code.
    How to do that?
    my code uses.
    Read(String strFilePath,String strFileName)
               filepath = strFilePath;
               filename = strFileName;
                strDriver= "jdbc:odbc:Driver={MicroSoft Excel Driver (*.xls)}";Thanks

    Please stay with one thread:
    http://forum.java.sun.com/thread.jspa?threadID=5145466&tstart=0
    Please don't cross-post this way.

  • Some J2ME midlets doubts!! help needed urgently!!!

    Hi,
    I am currently working in a company where it does wireless technology like WAP and I am assigned a task of creating a screensaver midlet. I have some doubts on the midlets.
    1) How do i use a midlet suites? From what I heard from my colleagues & friends, a servlet is needed for midlets to interact with one another. is it true?
    2) How do I get the startin midlet to take note the phone is idling so that the screen saver midlet can be called?
    Help needed urgently... if there is any source codes for me to refer to would be better... Thanks...
    Leonard

    indicates that MIDlet suites are isolated (on purpose) from each other, so you can't write over another one's address space.
    Also, I believe (at least on cell phones) that you have to specifically enter the Java Apps mode; unless you do the app won't execute. If you are in Java apps mode and a call comes in, the cell's OS puts the Java app currently executing on "Pause" mode and switches back to phone mode.
    Not sure if you will be able to have a Java app do that automatically.
    BTW why do you need a screensaver on an LCD display? Is it really intended to show an advertisement?
    Download and real all the docs you can from Sun, once you get over the generic Java deficiencies MIDlet's aren't that hard.

  • MySQL -- JDBC Connection help !!!

    Hi everybody...Well I have MySQL Server and Java, I get the JDBC and tried this:
    import java.sql.*;
    public class JdbcE {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "pass");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    And with that code all works fine...but when I change the Host from LOCALHOST to [ROUTER IP] like this:
    con = DriverManager.getConnection("jdbc:mysql://182.185.145.12/test", "user", "pass");
    I got this exception:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know how to solve it...
    I have a 2wire 1700HG router, maybe it would be a problem of the firewall can anyone help me to solve this problem??

    Well I sorry...I am very new in this kind of things...I just know that I have a 2wire 1700HG, I have installed MySQL Server, Java and mysql-connector-java...
    When I try this in the connection statement:
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "test");
    Everything works fine...but when I try this to connect from a remote PC
    con = DriverManager.getConnection("jdbc:mysql://189.145.185.182/test", "user", "test");
    This error comes out on screen:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know what can I do :S please help!! :D

  • Cannot import com.mysql.jdbc.exceptions

    Hi all,
    I have a pretty simple question.
    Why it is not possible to import classes from the package com.mysql.jdbc.exceptions?
    My classpath is set up correctly I can use jdb driver to connect to my db, but if I try to import com.mysql.jdbc.exceptions I receive a compile time error
    package com.mysql.jdbc.exceptions does not exist!
    Anyone could help?
    Thanks for your attention
    By Manio

    Thankfully there is no reason for you to do this so it's really not a problem.
    You should ONLY be importing java.sql.* (and sometimes javax) but not specific driver packages.

  • Tomcat com.mysql.jdbc.NotImplemented error in the first launch

    I created a war in java studio creator2 , export war file and deploy it by TomCat manager, After that ,when I launch a page at the first time , I got the following error
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.lang.RuntimeException: com.mysql.jdbc.NotImplemented: Feature not implemented
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    If I launch the same page again , this problem does not ocurr and the jsp page work normaly , it can access the database without any problem
    Right now , I am using Tomcat 5.0.28 , js2dk_1.4.2_04,mysql 4.0.16 , SuSe 8.0 , java studio creator 2
    jdbc driver class :org.gjt.mm.mysql.Driver
    url : jdbc:mysql://192.168.100.151/mangomaximo
    I have read many journal in this forums and I have follow the some of the instruction to try many time , but still failed .
    Could anyone help me ?
    Thanks

    Hi,
    See this "Deployment Example: Tomcat" might still helps
    http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/deploy/howtodeploy/deploy_tomcat.html
    MJ

Maybe you are looking for