Implement security mechanism for [ 1851190 ] Running outdated client can cause data corruption

This commit is contained in:
Carlos Ruiz 2008-02-13 06:24:51 +00:00
parent e9e5ee5504
commit 911d7e4f3e
18 changed files with 428 additions and 10 deletions

View File

@ -0,0 +1,71 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.adempiere.process;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.Adempiere;
import org.compiere.model.MClient;
import org.compiere.model.MSequence;
import org.compiere.process.SvrProcess;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Trx;
/**
* Sign Database Build
* [ 1851190 ] Running outdated client can cause data corruption
*
* @author Carlos Ruiz
*/
public class SignDatabaseBuild
{
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (SignDatabaseBuild.class);
public static void main(String[] args) throws Exception
{
Adempiere.startupEnvironment(false);
CLogMgt.setLevel(Level.FINE);
s_log.info("Sign Database Build");
s_log.info("-------------------");
PreparedStatement updateStmt = null;
try {
updateStmt = DB.prepareStatement(
"UPDATE AD_System "
+ "SET LastBuildInfo = ? "
+ "WHERE AD_System_ID = 0",
null);
updateStmt.setString(1, Adempiere.getImplementationVersion());
System.out.println(updateStmt);
updateStmt.executeUpdate();
} catch (Exception ex) {
throw ex;
} finally {
DB.close(updateStmt);
}
}
} // SignDatabaseBuild

View File

@ -200,6 +200,15 @@ public interface I_AD_System
*/
public boolean isAutoErrorReport();
/** Column name IsFailOnBuildDiffer */
public static final String COLUMNNAME_IsFailOnBuildDiffer = "IsFailOnBuildDiffer";
/** Set Fail if Build Differ */
public void setIsFailOnBuildDiffer (boolean IsFailOnBuildDiffer);
/** Get Fail if Build Differ */
public boolean isFailOnBuildDiffer();
/** Column name IsFailOnMissingModelValidator */
public static final String COLUMNNAME_IsFailOnMissingModelValidator = "IsFailOnMissingModelValidator";
@ -248,6 +257,15 @@ public interface I_AD_System
*/
public String getLDAPHost();
/** Column name LastBuildInfo */
public static final String COLUMNNAME_LastBuildInfo = "LastBuildInfo";
/** Set Last Build Info */
public void setLastBuildInfo (String LastBuildInfo);
/** Get Last Build Info */
public String getLastBuildInfo();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";

View File

@ -47,6 +47,8 @@ public class X_AD_System extends PO implements I_AD_System, I_Persistent
setIsAllowStatistics (false);
setIsAutoErrorReport (true);
// Y
setIsFailOnBuildDiffer (false);
// N
setIsFailOnMissingModelValidator (true);
// Y
setName (null);
@ -338,6 +340,27 @@ public class X_AD_System extends PO implements I_AD_System, I_Persistent
return false;
}
/** Set Fail if Build Differ.
@param IsFailOnBuildDiffer Fail if Build Differ */
public void setIsFailOnBuildDiffer (boolean IsFailOnBuildDiffer)
{
set_Value (COLUMNNAME_IsFailOnBuildDiffer, Boolean.valueOf(IsFailOnBuildDiffer));
}
/** Get Fail if Build Differ.
@return Fail if Build Differ */
public boolean isFailOnBuildDiffer ()
{
Object oo = get_Value(COLUMNNAME_IsFailOnBuildDiffer);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Fail on Missing Model Validator.
@param IsFailOnMissingModelValidator Fail on Missing Model Validator */
public void setIsFailOnMissingModelValidator (boolean IsFailOnMissingModelValidator)
@ -429,6 +452,26 @@ public class X_AD_System extends PO implements I_AD_System, I_Persistent
return (String)get_Value(COLUMNNAME_LDAPHost);
}
/** Set Last Build Info.
@param LastBuildInfo Last Build Info */
public void setLastBuildInfo (String LastBuildInfo)
{
if (LastBuildInfo != null && LastBuildInfo.length() > 255)
{
log.warning("Length > 255 - truncated");
LastBuildInfo = LastBuildInfo.substring(0, 255);
}
set_Value (COLUMNNAME_LastBuildInfo, LastBuildInfo);
}
/** Get Last Build Info.
@return Last Build Info */
public String getLastBuildInfo ()
{
return (String)get_Value(COLUMNNAME_LastBuildInfo);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
@ -577,7 +620,7 @@ public class X_AD_System extends PO implements I_AD_System, I_Persistent
*/
public void setRecord_ID (int Record_ID)
{
if (Record_ID <= 0)
if (Record_ID < 0)
set_Value (COLUMNNAME_Record_ID, null);
else
set_Value (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));

View File

@ -577,6 +577,64 @@ public final class DB
} // isDatabaseOK
/**************************************************************************
* Check Build Version of Database against running client
* @param ctx context
* @return true if Database version (date) is the same
*/
public static boolean isBuildOK (Properties ctx)
{
// Check Build
String buildClient = Adempiere.getImplementationVersion();
String buildDatabase = "";
boolean failOnBuild = false;
String sql = "SELECT LastBuildInfo, IsFailOnBuildDiffer FROM AD_System";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = prepareStatement(sql, null);
rs = pstmt.executeQuery();
if (rs.next()) {
buildDatabase = rs.getString(1);
failOnBuild = rs.getString(2).equals("Y");
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, "Problem with AD_System Table - Run system.sql script - " + e.toString());
return false;
}
finally
{
close(rs);
close(pstmt);
rs= null;
pstmt = null;
}
log.info("Build DB=" + buildDatabase);
log.info("Build Cl=" + buildClient);
// Identical DB version
if (buildClient.equals(buildDatabase))
return true;
String AD_Message = "BuildVersionError";
String title = org.compiere.Adempiere.getName() + " " + Msg.getMsg(ctx, AD_Message, true);
// The program assumes build version {0}, but database has build Version {1}.
String msg = Msg.getMsg(ctx, AD_Message); // complete message
msg = MessageFormat.format(msg, new Object[] {buildClient, buildDatabase});
if (! failOnBuild) {
log.warning(msg);
return true;
}
JOptionPane.showMessageDialog (null,
msg,
title, JOptionPane.ERROR_MESSAGE);
Env.exitEnv(1);
return false;
} // isDatabaseOK
/**************************************************************************
* Close Target
*/

View File

@ -229,6 +229,7 @@ public final class AMenu extends CFrame
* Show Login Screen - if not successful - exit
*/
log.finer("Login");
ALogin login = new ALogin(splash);
if (!login.initLogin()) // no automatic login
{
@ -245,6 +246,10 @@ public final class AMenu extends CFrame
AEnv.exit(1);
}
// Check Build
if (!DB.isBuildOK(m_ctx))
AEnv.exit(1);
// Check DB (AppsServer Version checked in Login)
DB.isDatabaseOK(m_ctx);
} // initSystem

View File

@ -0,0 +1,25 @@
@Title Install Adempiere Server
@Rem $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.bat,v 1.19 2005/09/08 21:54:12 jjanke Exp $
@Echo off
@if not "%JAVA_HOME%" == "" goto JAVA_HOME_OK
@Set JAVA=java
@Echo JAVA_HOME is not set.
@Echo You may not be able to start the required Setup window !!
@Echo Set JAVA_HOME to the directory of your local 1.5 JDK.
@Echo If you experience problems, run utils/WinEnv.js
@Echo Example: cscript utils\WinEnv.js C:\Adempiere "C:\Program Files\Java\jdk1.5.0_04"
goto START
:JAVA_HOME_OK
@Set JAVA=%JAVA_HOME%\bin\java
:START
@Echo =======================================
@Echo Sign Database Build
@Echo =======================================
@SET CP=lib\CInstall.jar;lib\Adempiere.jar;lib\CCTools.jar;lib\oracle.jar;lib\fyracle.jar;lib\derby.jar;lib\jboss.jar;lib\postgresql.jar;
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild

View File

@ -0,0 +1,21 @@
#!/bin/sh
#
echo Install Adempiere Server
# $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.sh,v 1.19 2005/09/08 21:54:12 jjanke Exp $
if [ $JAVA_HOME ]; then
JAVA=$JAVA_HOME/bin/java
else
JAVA=java
echo JAVA_HOME is not set.
echo You may not be able to start the Setup
echo Set JAVA_HOME to the directory of your local JDK.
fi
echo ===================================
echo Sign Database Build
echo ===================================
CP=lib/CInstall.jar:lib/Adempiere.jar:lib/CCTools.jar:lib/oracle.jar:lib/derby.jar:lib/fyracle.jar:lib/jboss.jar:lib/postgresql.jar:
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild

View File

@ -32,9 +32,9 @@ goto START
@Echo ErrorLevel = %ERRORLEVEL%
@IF NOT ERRORLEVEL = 1 GOTO NEXT
@Echo ***************************************
@Echo Check the error messabe above.
@Echo Check the error message above.
@Echo ***************************************
@Echo Maske sure that the environment is set correctly!
@Echo Make sure that the environment is set correctly!
@Echo Set environment variable JAVA_HOME manually
@Echo or use WinEnv.js in the util directory
@Echo ***************************************
@ -43,6 +43,12 @@ goto START
:NEXT
@Rem ===================================
@Rem Sign Database Build
@Rem ===================================
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild
@Rem ===================================
@Rem Setup Adempiere Environment
@Rem ===================================

View File

@ -28,6 +28,8 @@ ARGS=CONFIG
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS
# Sign database build
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild
#echo ===================================
#echo Setup Adempiere Server Environment
@ -49,4 +51,4 @@ find . -name '*.sh' -exec chmod a+x '{}' \;
#%JAVA% -classpath lib/Adempiere.jar:lib/AdempiereCLib.jar org.compiere.install.ConnectTest localhost
echo .
echo For problems, check log file in base directory
echo For problems, check log file in base directory

View File

@ -32,9 +32,9 @@ goto START
@Echo ErrorLevel = %ERRORLEVEL%
@IF NOT ERRORLEVEL = 1 GOTO NEXT
@Echo ***************************************
@Echo Check the error messabe above.
@Echo Check the error message above.
@Echo ***************************************
@Echo Maske sure that the environment is set correctly!
@Echo Make sure that the environment is set correctly!
@Echo Set environment variable JAVA_HOME manually
@Echo or use WinEnv.js in the util directory
@Echo ***************************************
@ -44,6 +44,12 @@ goto START
:NEXT
@Rem ===================================
@Rem Sign Database Build
@Rem ===================================
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild
@Rem ===================================
@Rem Setup Adempiere Environment
@Rem ===================================

View File

@ -25,6 +25,8 @@ ARGS=CONFIG
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.SilentSetup $ARGS
# Sign database build
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild
echo ===================================
echo Make .sh executable & set Env

View File

@ -0,0 +1,76 @@
-- Feb 12, 2008 11:33:32 PM COT
-- 1851190 - Running outdated client can cause data corruption
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53346,0,'LastBuildInfo',TO_DATE('2008-02-12 23:33:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Last Build Info','Last Build Info',TO_DATE('2008-02-12 23:33:30','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53346 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,54353,53346,0,10,531,'LastBuildInfo',TO_DATE('2008-02-12 23:34:02','YYYY-MM-DD HH24:MI:SS'),100,'D',255,'Y','N','N','N','N','N','N','N','N','N','Y','Last Build Info',0,TO_DATE('2008-02-12 23:34:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=54353 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53347,0,'IsFailOnBuildDiffer',TO_DATE('2008-02-12 23:34:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Fail if Build Differ','Fail if Build Differ',TO_DATE('2008-02-12 23:34:52','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53347 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,54354,53347,0,20,531,'IsFailOnBuildDiffer',TO_DATE('2008-02-12 23:35:26','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Fail if Build Differ',0,TO_DATE('2008-02-12 23:35:26','YYYY-MM-DD HH24:MI:SS'),100,0)
;
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=54354 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
ALTER TABLE AD_System ADD LastBuildInfo NVARCHAR2(255)
;
UPDATE AD_Field SET Name='Fail if Build Differ', Description=NULL, Help=NULL WHERE AD_Column_ID=54354 AND IsCentrallyMaintained='Y'
;
ALTER TABLE AD_System ADD IsFailOnBuildDiffer CHAR(1) DEFAULT 'N' CHECK (IsFailOnBuildDiffer IN ('Y','N')) NOT NULL
;
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,54354,54398,0,440,TO_DATE('2008-02-13 00:07:59','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Fail if Build Differ',TO_DATE('2008-02-13 00:07:59','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54398 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,54353,54399,0,440,TO_DATE('2008-02-13 00:08:02','YYYY-MM-DD HH24:MI:SS'),100,255,'D','Y','Y','Y','N','N','N','N','N','Last Build Info',TO_DATE('2008-02-13 00:08:02','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54399 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
UPDATE AD_Field SET SeqNo=260,Updated=TO_DATE('2008-02-13 00:08:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54399
;
UPDATE AD_Field SET SeqNo=270,Updated=TO_DATE('2008-02-13 00:08:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54398
;
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=54236
;
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=54399
;
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=54398
;
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=12870
;
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=12871
;
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53025,0,TO_DATE('2008-02-13 00:10:26','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Build Version Error','The program assumes build version {0}, but database has build version {1}.
This is likely to cause hard to fix errors.
Please contact administrator.','E',TO_DATE('2008-02-13 00:10:26','YYYY-MM-DD HH24:MI:SS'),100,'BuildVersionError')
;
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53025 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID)
;

View File

@ -0,0 +1,76 @@
-- Feb 12, 2008 11:33:32 PM COT
-- 1851190 - Running outdated client can cause data corruption
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53346,0,'LastBuildInfo',TO_TIMESTAMP('2008-02-12 23:33:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Last Build Info','Last Build Info',TO_TIMESTAMP('2008-02-12 23:33:30','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53346 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,54353,53346,0,10,531,'LastBuildInfo',TO_TIMESTAMP('2008-02-12 23:34:02','YYYY-MM-DD HH24:MI:SS'),100,'D',255,'Y','N','N','N','N','N','N','N','N','N','Y','Last Build Info',0,TO_TIMESTAMP('2008-02-12 23:34:02','YYYY-MM-DD HH24:MI:SS'),100,0)
;
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=54353 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53347,0,'IsFailOnBuildDiffer',TO_TIMESTAMP('2008-02-12 23:34:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Fail if Build Differ','Fail if Build Differ',TO_TIMESTAMP('2008-02-12 23:34:52','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53347 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,54354,53347,0,20,531,'IsFailOnBuildDiffer',TO_TIMESTAMP('2008-02-12 23:35:26','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Fail if Build Differ',0,TO_TIMESTAMP('2008-02-12 23:35:26','YYYY-MM-DD HH24:MI:SS'),100,0)
;
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=54354 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
ALTER TABLE AD_System ADD COLUMN LastBuildInfo VARCHAR(255)
;
UPDATE AD_Field SET Name='Fail if Build Differ', Description=NULL, Help=NULL WHERE AD_Column_ID=54354 AND IsCentrallyMaintained='Y'
;
ALTER TABLE AD_System ADD COLUMN IsFailOnBuildDiffer CHAR(1) DEFAULT 'N' CHECK (IsFailOnBuildDiffer IN ('Y','N')) NOT NULL
;
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,54354,54398,0,440,TO_TIMESTAMP('2008-02-13 00:07:59','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Fail if Build Differ',TO_TIMESTAMP('2008-02-13 00:07:59','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54398 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,54353,54399,0,440,TO_TIMESTAMP('2008-02-13 00:08:02','YYYY-MM-DD HH24:MI:SS'),100,255,'D','Y','Y','Y','N','N','N','N','N','Last Build Info',TO_TIMESTAMP('2008-02-13 00:08:02','YYYY-MM-DD HH24:MI:SS'),100)
;
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54399 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
UPDATE AD_Field SET SeqNo=260,Updated=TO_TIMESTAMP('2008-02-13 00:08:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54399
;
UPDATE AD_Field SET SeqNo=270,Updated=TO_TIMESTAMP('2008-02-13 00:08:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54398
;
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=54236
;
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=54399
;
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=54398
;
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=12870
;
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=12871
;
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53025,0,TO_TIMESTAMP('2008-02-13 00:10:26','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Build Version Error','The program assumes build version {0}, but database has build version {1}.
This is likely to cause hard to fix errors.
Please contact administrator.','E',TO_TIMESTAMP('2008-02-13 00:10:26','YYYY-MM-DD HH24:MI:SS'),100,'BuildVersionError')
;
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53025 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID)
;

View File

@ -1,10 +1,12 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<jnlp spec = "1.5+" version = "3.3.1b"
codebase = "$$context/adempiereHome">
codebase = "$$context/adempiereHome"
href = "$$context/adempiere.jnlp">
<information>
<title>Adempiere Client 3.3.1b $$context</title>
<vendor>ADempiere, Inc.</vendor>
<homepage href = "http://www.adempiere.org"/>
<offline-allowed/>
<description>Adempiere ERP+CRM ($$context) - Smart Business Solution for Distribution and Service - globally</description>
<description kind = "short">Adempiere ERP+CRM ($$context)</description>
<description kind = "one-line">Adempiere ERP+CRM</description>
@ -14,11 +16,10 @@
<desktop/>
<menu submenu="Adempiere 3.3.1b $$context"/>
</shortcut>
</information>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always"/>
<resources>
<j2se version = "1.5+" href = "http://java.sun.com/products/autodl/j2se" initial-heap-size = "32m" max-heap-size = "512m"/>
<jar href = "Adempiere.jar" main = "true" download = "eager"/>
@ -27,4 +28,4 @@
<property name="adempiereJNLP" value="$$context"/>
</resources>
<application-desc main-class = "org.compiere.Adempiere"/>
</jnlp>
</jnlp>

View File

@ -13,4 +13,6 @@
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\DBRestore system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_HOME%\RUN_SignDatabaseBuild
@pause

View File

@ -15,3 +15,5 @@ read in
# Parameter: <systemAccount> <adempiereID> <adempierePwd>
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
sh $ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
sh $ADEMPIERE_HOME/RUN_SignDatabaseBuild.sh

View File

@ -13,4 +13,6 @@
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_HOME%\RUN_SignDatabaseBuild
@pause

View File

@ -25,3 +25,5 @@ read in
# Parameter: <systemAccount> <AdempiereID> <AdempierePwd>
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
sh $ADEMPIERE_HOME/RUN_SignDatabaseBuild.sh