Fixed issue 12683. Committed previous fix but with two improvements:
authorAntonio Moreno <antonio.moreno@openbravo.com>
Thu, 10 Jun 2010 16:29:24 +0200
changeset 7580 85eb92e7e94b
parent 7579 7270a43c1818
child 7581 7ff449c27916
Fixed issue 12683. Committed previous fix but with two improvements:
now the property is set if it needs to be, and not touched if it doesn't
hopefully all relevant tasks should have the property now
build.xml
config/Openbravo.properties.template
src-db/database/build.xml
src-trl/build.xml
src-util/buildvalidation/build.xml
src-util/modulescript/build.xml
src-wad/build.xml
src/build.xml
src/buildAD.xml
--- a/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -12,7 +12,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2010 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -187,7 +187,7 @@
       <equals arg1="${bbdd.rdbms}" arg2="POSTGRE" />
     </and>
   </condition>
-
+ 
   <path id="project.class.path">
     <pathelement path="${build}" />
     <pathelement path="${base.src}" />
@@ -775,6 +775,9 @@
     <java classname="org.openbravo.service.system.RestartTomcat" spawn="true" fork="true" maxmemory="${build.maxmemory}">
       <arg line="${base.src}" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
--- a/config/Openbravo.properties.template	Thu Jun 10 10:55:27 2010 +0530
+++ b/config/Openbravo.properties.template	Thu Jun 10 16:29:24 2010 +0200
@@ -66,6 +66,10 @@
 # bbdd.password=TAD
 # bbdd.sessionConfig=ALTER SESSION SET NLS_DATE_FORMAT='DD-MM-YYYY' NLS_NUMERIC_CHARACTERS='.,'
 
+# Oracle instances in linux, can delay on getting DB connection (issue #12683). 
+# In these cases this property can be set to solve the problem
+# java.security.egd=file:///dev/urandom
+
 bbdd.rdbms=POSTGRE
 bbdd.driver=org.postgresql.Driver
 bbdd.url=jdbc:postgresql://localhost:5432
--- a/src-db/database/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src-db/database/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -95,6 +95,9 @@
       <arg value="*/src-db/database/sourcedata"/>
       <arg value="${force}"/>
       <classpath refid="runtime-classpath" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <antcall target="database.postupdate.${bbdd.rdbms}" />
     <antcall target="update.dbupdate.timestamp" />
@@ -121,6 +124,9 @@
       <arg value="${module}"/>
       <arg value="${force}"/>
       <classpath refid="runtime-classpath" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <antcall target="database.postupdate.${bbdd.rdbms}" />
     <antcall target="update.dbupdate.timestamp" />
--- a/src-trl/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src-trl/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -59,6 +59,9 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql ./src '${build.trl.sqlc}'"/>
       <classpath refid="trl.class.path"/>
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
--- a/src-util/buildvalidation/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src-util/buildvalidation/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -62,6 +62,9 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.validation.sqlc}'" />
       <classpath refid="buildvalidation.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <javac srcdir="${build.validation.sqlc}/src" includes="**/*.java" destdir="${build.validation}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="buildvalidation.class.path" />
@@ -72,6 +75,9 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${base.modules}'/'${module}'/src-util/buildvalidation/src */src-util/buildvalidation" />
       <classpath refid="buildvalidation.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <javac srcdir="${base.modules}/${module}/src-util/buildvalidation/src" includes="**/*.java" destdir="${base.modules}/${module}/build/classes" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="buildvalidation.class.path" />
@@ -98,6 +104,9 @@
       <arg value="${base.src}/../"/>
       <arg value="${module}"/>
       <classpath refid="buildvalidation.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
   
--- a/src-util/modulescript/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src-util/modulescript/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -62,6 +62,9 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.module.sqlc}'" />
       <classpath refid="modulescript.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <javac srcdir="${build.module.sqlc}/src" includes="**/*.java" destdir="${build.module}" fork="true" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="modulescript.class.path" />
@@ -72,6 +75,9 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${base.modules}'/'${module}'/src-util/modulescript/src */src-util/modulescript" />
       <classpath refid="modulescript.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <javac srcdir="${base.modules}/${module}/src-util/modulescript/src" includes="**/*.java" fork="true" destdir="${base.modules}/${module}/build/classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="modulescript.class.path" />
--- a/src-wad/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src-wad/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -13,7 +13,7 @@
  * and  limitations under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2005-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2005-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s): Openbravo S.L.U.
  ************************************************************************
@@ -61,11 +61,17 @@
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.wad.sqlc}'" />
       <classpath refid="wad.class.path" />
+      <syspropertyset>
+        <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   	
   	<java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.wad.sqlc}'/src */src-wad" />
   	  <classpath refid="wad.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
   	</java>
   </target>
 
--- a/src/build.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src/build.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -132,6 +132,9 @@
     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="clean '${base.config}/Openbravo.properties'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
   
@@ -139,6 +142,9 @@
     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="remove '${base.config}/Openbravo.properties'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
@@ -164,6 +170,9 @@
       <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
       <jvmarg value="-Dsqlc.listOfFiles=ComboTableQuery_data.xsql,ActionButton_data.xsql,PInstanceProcess_data.xsql,SessionLogin_data.xsql,ApplyModule_data.xsql,TableSQLQuery_data.xsql,DateTime_data.xsql,ComboTableQuery_data.xsql,PrintJR_data.xsql,DocumentNo_data.xsql,WindowAccess_data.xsql,ComboTable_data.xsql,Tab_data.xsql,WindowTree_data.xsql,ErrorTextParser_data.xsql,Utility_data.xsql,MessageBD_data.xsql,LanguageCombo_data.xsql,Translation_data.xsql,Buscador_data.xsql,WindowTabs_data.xsql,Pinstance_data.xsql,ProcessRequest_data.xsql,Trigger_data.xsql,ProcessRun_data.xsql,Process_data.xsql,OrgTree_data.xsql,Seguridad_data.xsql,DefaultOptions_data.xsql,SystemPreferences_data.xsql,DefaultSessionValues_data.xsql,DefaultValues_data.xsql,Attribute_data.xsql,ClassInfo_data.xsql,"/>
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <javac includes="org/openbravo/erpCommon/modules/ApplyModuleTask.java" destdir="${build.apply.module}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" verbose="false" nowarn="${friendlyWarnings}">
       <src path="${base.src}"/>
@@ -177,11 +186,17 @@
     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
       <jvmarg value="-Dsqlc.queryExecutionStrategy=traditional"/>
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml" />
     <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf" />
@@ -266,6 +281,9 @@
     <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
       <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
       <param name="base.src.gen" value="${base.src.gen}" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
       <classpath>
         <path refid="project.class.path" />
       </classpath>
@@ -433,6 +451,9 @@
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'noquick'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   </target>
@@ -441,6 +462,9 @@
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'quick'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   </target>
@@ -506,12 +530,18 @@
     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
   <target name="compileSqlcmod" depends="sqlcmod">
     <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </javac>
   </target>
   <target name="postsrcmod">
@@ -774,6 +804,9 @@
     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}/Openbravo.properties' ${extension} '${base.modules}' '*/src'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
@@ -799,6 +832,9 @@
     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}/Openbravo.properties' ${extension} '${basedir}'" />
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
   </target>
 
--- a/src/buildAD.xml	Thu Jun 10 10:55:27 2010 +0530
+++ b/src/buildAD.xml	Thu Jun 10 16:29:24 2010 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,6 +27,9 @@
       <arg line="'${base.config}'/Openbravo.properties .xsql ../srcAD '${build.sqlc}'/src" />
       <jvmarg value="-Dsqlc.queryExecutionStrategy=traditional"/>
       <classpath refid="project.class.path" />
+      <syspropertyset>
+         <propertyref name="java.security.egd" />
+      </syspropertyset>
     </java>
 
   </target>