Package java.sql

Examples of java.sql.SQLException.initCause()


        }

        String exception_string = DbUtil.getSQLExceptionString(e);
        String full_error_msg = err_msg + " [" + exception_string + ']';
        SQLException wrapper_exception = new SQLException(full_error_msg, e.getSQLState(), e.getErrorCode());
        wrapper_exception.initCause(e);
        log(LogPriority.FATAL, e, DbUtilsI18NResourceKeys.DBSETUP_FATAL_SQL_EXCEPTION, full_error_msg);
        throw wrapper_exception;
    }

    /**
 
View Full Code Here


            if (serverOutput != null) {
                serverOutput.close();
            }
        } catch(Exception e) {
            SQLException se = new SQLException("Error shutting down server");
            se.initCause(e);
        }
    }

   /**
     * starts the Networs server for this configuration.
View Full Code Here

            if (!started) {
                 throw failException;
            }
        } catch (Exception e) {
            SQLException se = new SQLException("Error starting network  server");
            se.initCause(failException);
            throw se;
      }
    }
    /**
     * Set the verbosity, i.e., whether debug statements print.
View Full Code Here

                in.close();
            }
        } catch (IOException e) {
            SQLException exception =
                new SQLException("Failed to parse bundle " + id);
            exception.initCause(e);
            throw exception;
        }
    }

    /**
 
View Full Code Here

                }
                byteArray[i] = (byte) value;
            }
        } catch (IOException e) {
            SQLException ex = new SQLException();
            ex.initCause(e);
            throw ex;
        }

        try {
            updateString(columnIndex, new String(byteArray, "ISO-8859-1")); //$NON-NLS-1$
View Full Code Here

                }
            }

        } catch (IOException e) {
            SQLException ex = new SQLException();
            ex.initCause(e);
            throw ex;
        }

        updateBytes(columnIndex, byteArray);
    }
View Full Code Here

                }
                out.write(value);
            }
        } catch (IOException e) {
            SQLException ex = new SQLException();
            ex.initCause(e);
            throw ex;
        }

        updateString(columnIndex, out.toString());
    }
View Full Code Here

                    interceptor.reset(this, con);
                    //configure the last one to be held by the connection
                    handler = interceptor;
                }catch(Exception x) {
                    SQLException sx = new SQLException("Unable to instantiate interceptor chain.");
                    sx.initCause(x);
                    throw sx;
                }
            }
            //cache handler for the next iteration
            con.setHandler(handler);
View Full Code Here

            }
            //return the connection
            return connection;
        }catch (Exception x) {
            SQLException s = new SQLException();
            s.initCause(x);
            throw s;
        }

    }
View Full Code Here

            }catch (Exception x) {
                log.error("Unable to inform interceptor of pool start.",x);
                if (jmxPool!=null) jmxPool.notify(org.apache.tomcat.jdbc.pool.jmx.ConnectionPool.NOTIFY_INIT, getStackTrace(x));
                close(true);
                SQLException ex = new SQLException();
                ex.initCause(x);
                throw ex;
            }
        }

        //initialize the pool with its initial set of members
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.