Fix [2879030] - Import don't show error

https://sourceforge.net/tracker/index.php?func=detail&aid=2879030&group_id=176962&atid=879332
This commit is contained in:
Carlos Ruiz 2009-10-14 20:38:03 +00:00
parent edfe71b546
commit 9d3a423dcd
19 changed files with 31 additions and 28 deletions

View File

@ -251,7 +251,7 @@ public class ImportPriceList extends SvrProcess
if (no != 0)
log.warning("No Mandatory BreakValue=" + no);
commit();
commitEx();
// -------------------------------------------------------------------
int noInsertpp = 0;
@ -431,7 +431,7 @@ public class ImportPriceList extends SvrProcess
pstmt_setImported.setInt(2, I_PriceList_ID);
no = pstmt_setImported.executeUpdate();
//
commit();
commitEx();
} // for all I_PriceList
//
}

View File

@ -92,7 +92,7 @@ public class UpdateRoleMenu extends SvrProcess
boolean active = "Y".equals(rs.getString(2));
addUpdateRole(getCtx(), p_role_id, menuId, active, get_TrxName());
}
commit();
commitEx();
}
catch (Exception ex)
{

View File

@ -62,7 +62,7 @@ public class UpdateSequenceNo extends SvrProcess {
get_TrxName());
insertStmt.setString(1, year);
insertStmt.executeUpdate();
commit();
commitEx();
} catch (Exception ex) {
rollback();

View File

@ -123,7 +123,7 @@ public class AllocationAuto extends SvrProcess
{
countBP++;
countAlloc += count;
commit();
commitEx();
}
}
}
@ -155,7 +155,7 @@ public class AllocationAuto extends SvrProcess
{
countBP++;
countAlloc += count;
commit();
commitEx();
}
}
}

View File

@ -17,6 +17,7 @@
package org.compiere.process;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.logging.Level;
@ -100,8 +101,9 @@ public class BPartnerValidate extends SvrProcess
/**
* Check BP
* @param bp bp
* @throws SQLException
*/
private void checkBP (MBPartner bp)
private void checkBP (MBPartner bp) throws SQLException
{
addLog(0, null, null, bp.getName() + ":");
// See also VMerge.postMerge
@ -117,7 +119,7 @@ public class BPartnerValidate extends SvrProcess
addLog(0, null, bp.getTotalOpenBalance(), Msg.getElement(getCtx(), "TotalOpenBalance"));
addLog(0, null, bp.getActualLifeTimeValue(), Msg.getElement(getCtx(), "ActualLifeTimeValue"));
//
commit();
commitEx();
} // checkBP

View File

@ -135,7 +135,7 @@ public class CostUpdate extends SvrProcess
m_ass = MAcctSchema.getClientAcctSchema(getCtx(), client.getAD_Client_ID());
for (int i = 0; i < m_ass.length; i++)
createNew(m_ass[i]);
commit();
commitEx();
// Update Cost
int counter = update();

View File

@ -252,7 +252,7 @@ public class ImportAccount extends SvrProcess
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Found ElementValue=" + no);
commit();
commitEx();
// -------------------------------------------------------------------
int noInsert = 0;
@ -332,7 +332,7 @@ public class ImportAccount extends SvrProcess
addLog (0, null, new BigDecimal (noInsert), "@C_ElementValue_ID@: @Inserted@");
addLog (0, null, new BigDecimal (noUpdate), "@C_ElementValue_ID@: @Updated@");
commit();
commitEx();
// ***** Set Parent
sql = new StringBuffer ("UPDATE I_ElementValue i "
@ -399,7 +399,7 @@ public class ImportAccount extends SvrProcess
}
addLog (0, null, new BigDecimal (noParentUpdate), "@ParentElementValue_ID@: @Updated@");
commit();
commitEx();
// Reset Processing Flag
sql = new StringBuffer ("UPDATE I_ElementValue "

View File

@ -276,7 +276,7 @@ implements ImportProcess
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_AFTER_VALIDATE);
commit();
commitEx();
if (p_IsValidateOnly)
{
return "Validated";
@ -573,7 +573,7 @@ implements ImportProcess
impBP.setProcessed(true);
impBP.setProcessing(false);
impBP.saveEx();
commit();
commitEx();
} // for all I_Product
DB.close(rs, pstmt);
}

View File

@ -357,7 +357,7 @@ public class ImportBankStatement extends SvrProcess
if (no != 0)
log.info("Duplicates=" + no);
commit();
commitEx();
//Import Bank Statement
sql = new StringBuffer("SELECT * FROM I_BankStatement"

View File

@ -227,7 +227,7 @@ public class ImportConversionRate extends SvrProcess
// if (no != 0)
// log.warn ("Inconsistent Rates =" + no);
commit();
commitEx();
/*********************************************************************/
int noInsert = 0;

View File

@ -574,7 +574,7 @@ public class ImportGLJournal extends SvrProcess
pstmt = null;
// globalqss (moved the commit here to save the error messages)
commit();
commitEx();
// Count Errors
int errors = DB.getSQLValue(get_TrxName(),

View File

@ -133,7 +133,7 @@ public class ImportInOutConfirm extends SvrProcess
if (no != 0)
log.warning ("Invalid Qty=" + no);
commit();
commitEx();
/*********************************************************************/

View File

@ -210,7 +210,7 @@ public class ImportInventory extends SvrProcess
if (no != 0)
log.warning ("No QtyCount=" + no);
commit();
commitEx();
/*********************************************************************/

View File

@ -476,7 +476,7 @@ public class ImportInvoice extends SvrProcess
if (no != 0)
log.warning ("Invalid Tax=" + no);
commit();
commitEx();
// -- New BPartner ---------------------------------------------------
@ -609,7 +609,7 @@ public class ImportInvoice extends SvrProcess
if (no != 0)
log.warning ("No BPartner=" + no);
commit();
commitEx();
// -- New Invoices -----------------------------------------------------

View File

@ -475,7 +475,7 @@ public class ImportOrder extends SvrProcess
if (no != 0)
log.warning ("Invalid Tax=" + no);
commit();
commitEx();
// -- New BPartner ---------------------------------------------------
@ -609,7 +609,7 @@ public class ImportOrder extends SvrProcess
if (no != 0)
log.warning ("No BPartner=" + no);
commit();
commitEx();
// -- New Orders -----------------------------------------------------

View File

@ -404,7 +404,7 @@ public class ImportPayment extends SvrProcess
if (no != 0)
log.warning ("No DocType=" + no);
commit();
commitEx();
//Import Bank Statement
sql = new StringBuffer("SELECT * FROM I_Payment"

View File

@ -378,7 +378,7 @@ public class ImportProduct extends SvrProcess
}
log.fine("C_TaxCategory_ID=" + C_TaxCategory_ID);
commit();
commitEx();
// -------------------------------------------------------------------
int noInsert = 0;
@ -628,7 +628,7 @@ public class ImportProduct extends SvrProcess
pstmt_setImported.setInt(2, I_Product_ID);
no = pstmt_setImported.executeUpdate();
//
commit();
commitEx();
} // for all I_Product
rs.close();
pstmt.close();

View File

@ -238,7 +238,7 @@ public class ImportReportLine extends SvrProcess
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Set PA_ReportLine_ID=" + no);
commit();
commitEx();
// -------------------------------------------------------------------
int noInsertLine = 0;
@ -463,7 +463,7 @@ public class ImportReportLine extends SvrProcess
log.finest("Delete ReportSource with Null Account= " + no + ", I_ReportLine_ID=" + I_ReportLine_ID + ", PA_ReportSource_ID=" + PA_ReportSource_ID);
// End afalcone 22/02/2007 - F.R. [ 1642250 ] Import ReportLine / Very Slow Reports
commit();
commitEx();
}
rs.close();
pstmt.close();

View File

@ -215,6 +215,7 @@ public abstract class SvrProcess implements ProcessCall
/**
* Commit
* @deprecated suggested to use commitEx instead
*/
protected void commit()
{