Examples of JDBCException


Examples of org.hibernate.JDBCException

          log.debug( trimmedSql );
          statement.execute( trimmedSql );
        }
      }
      catch ( SQLException e ) {
        throw new JDBCException( "Error during import script execution at line " + lineNo, e );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      try {
        execute( script, export, fileOutput, statement, createSQL[j] );
      }
      catch ( SQLException e ) {
        if ( haltOnError ) {
          throw new JDBCException( "Error during DDL export", e );
        }
        exceptions.add( e );
        log.error( "Unsuccessful: " + createSQL[j] );
        log.error( e.getMessage() );
      }
View Full Code Here

Examples of org.hibernate.JDBCException

  public final Dialect resolveDialect(DatabaseMetaData metaData) {
    try {
      return resolveDialectInternal( metaData );
    }
    catch ( SQLException sqlException ) {
      JDBCException jdbcException = BasicSQLExceptionConverter.INSTANCE.convert( sqlException );
            if (jdbcException instanceof JDBCConnectionException) throw jdbcException;
            LOG.warnf("%s : %s", BasicSQLExceptionConverter.MSG, sqlException.getMessage());
            return null;
    }
    catch ( Throwable t ) {
View Full Code Here

Examples of org.hibernate.JDBCException

  }

  @Override
  public JDBCException convert(SQLException sqlException, String message, String sql) {
    for ( SQLExceptionConversionDelegate delegate : delegates ) {
      final JDBCException jdbcException = delegate.convert( sqlException, message, sql );
      if ( jdbcException != null ) {
        return jdbcException;
      }
    }
    return new GenericJDBCException( message, sqlException, sql );
View Full Code Here

Examples of org.hibernate.JDBCException

      Blob blob = createBlob();
      blob.setBytes( 1, bytes );
      return blob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to set BLOB bytes after creation", e );
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      byteStream.close();
      // todo : validate length written versus length given?
      return blob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to prepare BLOB binary stream for writing",e );
    }
    catch ( IOException e ) {
      throw new HibernateException( "Unable to write stream contents to BLOB", e );
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      Clob clob = createClob();
      clob.setString( 1, string );
      return clob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to set CLOB string after creation", e );
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      writer.flush();
      writer.close();
      return clob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to prepare CLOB stream for writing", e );
    }
    catch ( IOException e ) {
      throw new HibernateException( "Unable to write CLOB stream content", e );
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      Clob clob = createNClob();
      clob.setString( 1, string );
      return clob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to set NCLOB string after creation", e );
    }
  }
View Full Code Here

Examples of org.hibernate.JDBCException

      writer.flush();
      writer.close();
      return clob;
    }
    catch ( SQLException e ) {
      throw new JDBCException( "Unable to prepare NCLOB stream for writing", e );
    }
    catch ( IOException e ) {
      throw new HibernateException( "Unable to write NCLOB stream content", e );
    }
  }
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.