public void closeInsert() throws KettleDatabaseException { if ( prepStatementInsert != null ) { try { prepStatementInsert.close(); prepStatementInsert = null; } catch ( SQLException e ) { throw new KettleDatabaseException( "Error closing insert prepared statement.", e ); } } }
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (DBProcMeta) smi; data = (DBProcData) sdi; if ( data.db != null ) { // CHE: Properly close the callable statement try { data.db.closeProcedureStatement(); } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "DBProc.Log.CloseProcedureError" ) + e.getMessage() ); } try { if ( !meta.isAutoCommit() ) { data.db.commit(); } } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "DBProc.Log.CommitError" ) + e.getMessage() ); } finally { data.db.disconnect(); } } super.dispose( smi, sdi ); }
throw new KettleDatabaseException( BaseMessages.getString( PKG, "JobSQL.NoSQLFileSpecified" ) ); if ( !SQLfile.exists() ) { logError( BaseMessages.getString( PKG, "JobSQL.SQLFileNotExist", realfilename ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "JobSQL.SQLFileNotExist", realfilename ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "JobSQL.ErrorRunningSQLfromFile" ), e ); logError( BaseMessages.getString( PKG, "JobSQL.ErrorRunJobEntry", je.getMessage() ) ); } finally { db.disconnect();
throw Database.createKettleDatabaseBatchException( "Error updating batch", ex ); } catch ( Exception ex ) { throw new KettleDatabaseException( "Unexpected error inserting row", ex ); errorMessage = dbe.toString(); } else { if ( meta.ignoreErrors() ) { if ( log.isBasic() ) { logBasic( "WARNING: Couldn't insert row into table: " + rowMeta.getString( r ) + Const.CR + dbe.getMessage() ); + rowMeta.getString( r ) + Const.CR + dbe.getMessage() );
e.printStackTrace(); logError( e.getMessage() ); return false;
throw new KettleDatabaseException( BaseMessages.getString( PKG, "SynchronizeAfterMerge.Exception.KeyCouldNotFound", data.lookupParameterRowMeta.getString( lookupRow ) ) ); "SynchronizeAfterMerge.Error.UpdatingBatch" ), ex ); } catch ( Exception ex ) { throw new KettleDatabaseException( "Unexpected error inserting row", ex ); errorMessage = dbe.toString(); } else { setErrors( getErrors() + 1 );
data.nextrow = data.db.getRow( data.rs, meta.isLazyConversionActive() ); } catch ( KettleDatabaseException e ) { if ( e.getCause() instanceof SQLException && isStopped() ) { logDebug( e.getMessage() ); return false; } else {
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (CombinationLookupMeta) smi; data = (CombinationLookupData) sdi; if ( data.db != null ) { try { if ( !data.db.isAutoCommit() ) { if ( getErrors() == 0 ) { data.db.commit(); } else { data.db.rollback(); } } } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "CombinationLookup.Log.UnexpectedError" ) + " : " + e.toString() ); } finally { data.db.disconnect(); } } super.dispose( smi, sdi ); }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException { try { rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename ); // save the arguments... if ( arguments != null ) { for ( int i = 0; i < arguments.length; i++ ) { rep.saveJobEntryAttribute( id_job, getObjectId(), i, "name", arguments[i] ); } } } catch ( KettleDatabaseException dbe ) { throw new KettleException( BaseMessages.getString( PKG, "JobEntryFilesExist.ERROR_0003_Cannot_Save_Job_Entry", "" + id_job, dbe.getMessage() ) ); } }
throw new KettleDatabaseException( "Unable to connect to logging database [" + logTable.getDatabaseMeta() + "]", e ); } finally { stat.setError( BaseMessages.getString( PKG, "TransMeta.SQLStatement.ErrorDesc.ErrorObtainingTransformationLogTableInfo" ) + dbe.getMessage() ); stats.add( stat );
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (DeleteMeta) smi; data = (DeleteData) sdi; if ( data.db != null ) { try { if ( !data.db.isAutoCommit() ) { if ( getErrors() == 0 ) { data.db.commit(); } else { data.db.rollback(); } } data.db.closeUpdate(); } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "Delete.Log.UnableToCommitUpdateConnection" ) + data.db + "] :" + e.toString() ); setErrors( 1 ); } finally { data.db.disconnect(); } } super.dispose( smi, sdi ); }
@Override public RowMetaInterface getTableFields() { RowMetaInterface fields = null; if ( databaseMeta != null ) { Database db = createDatabaseObject(); try { db.connect(); fields = db.getTableFieldsMeta( schemaName, tableName ); } catch ( KettleDatabaseException dbe ) { logError( BaseMessages.getString( PKG, "DimensionLookupMeta.Log.DatabaseErrorOccurred" ) + dbe.getMessage() ); } finally { db.disconnect(); } } return fields; }
public boolean absolute( ResultSet rs, int position ) throws KettleDatabaseException { try { return rs.absolute( position ); } catch ( SQLException e ) { throw new KettleDatabaseException( "Unable to move resultset to position " + position, e ); } }
throw new KettleDatabaseException(); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); throw new KettleDatabaseException( BaseMessages.getString( PKG, "TransMeta.Log.UserCancelledTransSave" ) ); + Const.CR + dbe.getMessage() ); throw new KettleException( BaseMessages.getString( PKG, "TransMeta.Log.ErrorSavingTransformationToRepository" ), dbe );
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (InsertUpdateMeta) smi; data = (InsertUpdateData) sdi; if ( data.db != null ) { try { if ( !data.db.isAutoCommit() ) { if ( getErrors() == 0 ) { data.db.commit(); } else { data.db.rollback(); } } data.db.closeUpdate(); data.db.closeInsert(); } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "InsertUpdate.Log.UnableToCommitConnection" ) + e.toString() ); setErrors( 1 ); } finally { data.db.disconnect(); } } super.dispose( smi, sdi ); }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException { try { rep.saveJobEntryAttribute( id_job, getObjectId(), "foldername", foldername ); rep.saveJobEntryAttribute( id_job, getObjectId(), "specify_wildcard", specifywildcard ); rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcard", wildcard ); rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcardexclude", wildcardexclude ); } catch ( KettleDatabaseException dbe ) { throw new KettleXMLException( BaseMessages.getString( PKG, "JobEntryDeleteResultFilenames.CanNotSaveToRep", "" + id_job, dbe.getMessage() ) ); } }
public void closePreparedStatement( PreparedStatement ps ) throws KettleDatabaseException { if ( ps != null ) { try { ps.close(); } catch ( SQLException e ) { throw new KettleDatabaseException( "Error closing prepared statement", e ); } } }
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) { meta = (UpdateMeta) smi; data = (UpdateData) sdi; if ( data.db != null ) { try { if ( !data.db.isAutoCommit() ) { if ( getErrors() == 0 ) { data.db.emptyAndCommit( data.prepStatementUpdate, meta.useBatchUpdate() ); } else { data.db.rollback(); } } data.db.closePreparedStatement( data.prepStatementUpdate ); data.db.closePreparedStatement( data.prepStatementLookup ); } catch ( KettleDatabaseException e ) { logError( BaseMessages.getString( PKG, "Update.Log.UnableToCommitUpdateConnection" ) + data.db + "] :" + e.toString() ); setErrors( 1 ); } finally { data.db.disconnect(); } } super.dispose( smi, sdi ); }
} catch ( KettleDatabaseException dbe ) { retval.setError( BaseMessages.getString( PKG, "IngresVectorWiseLoaderMeta.Error.ErrorConnecting", dbe .getMessage() ) ); } finally { db.disconnect();
public void closeUpdate() throws KettleDatabaseException { if ( prepStatementUpdate != null ) { try { prepStatementUpdate.close(); prepStatementUpdate = null; } catch ( SQLException e ) { throw new KettleDatabaseException( "Error closing update prepared statement.", e ); } } }