diff --git a/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java b/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java index ac1147c047..4824879d0a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java +++ b/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.util.Properties; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.Adempiere; import org.compiere.model.MClient; import org.compiere.model.MSequence; @@ -79,6 +80,7 @@ public class SequenceCheck extends SvrProcess catch (Exception e) { s_log.log(Level.SEVERE, "validate", e); + throw new AdempiereException(e); } } // validate @@ -124,6 +126,7 @@ public class SequenceCheck extends SvrProcess catch (Exception e) { s_log.log(Level.SEVERE, sql, e); + throw new AdempiereException(e); } finally { @@ -173,6 +176,7 @@ public class SequenceCheck extends SvrProcess catch (Exception e) { s_log.log (Level.SEVERE, sql, e); + throw new AdempiereException(e); } finally { @@ -233,6 +237,7 @@ public class SequenceCheck extends SvrProcess catch (Exception e) { s_log.log(Level.SEVERE, sql, e); + throw new AdempiereException(e); } finally { diff --git a/org.adempiere.base/src/org/compiere/model/MSequence.java b/org.adempiere.base/src/org/compiere/model/MSequence.java index 3e1ca23654..d0859d301d 100644 --- a/org.adempiere.base/src/org/compiere/model/MSequence.java +++ b/org.adempiere.base/src/org/compiere/model/MSequence.java @@ -902,6 +902,7 @@ public class MSequence extends X_AD_Sequence + "FROM AD_Table t" + " INNER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) " + "WHERE t.TableName='" + tableName + "'" + + " AND t.IsView='N'" // ignore for views -- IDEMPIERE-2513 + " AND c.ColumnName='" + tableName + "_ID'"); if (AD_Column_ID <= 0) return null;