You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2024/04/28 06:54:52 UTC

(ofbiz-framework) branch release18.12 updated (075fce1d65 -> 2f4d1acdb9)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


    from 075fce1d65 Fixed: Could not find PortalPage with portalPageId [] (OFBIZ-13071)
     new 75dc51582d Improved: minor changes
     new 146a20a0f1 Improved: Could not find PortalPage with portalPageId []  (OFBIZ-13071)
     new 9756438128 Fixed: Old error in showPortalPage screen (OFBIZ-13059)
     new f3a07162d4 Improved: Rework the log4j2.xml configuration to limit the number of log files generated (OFBIZ-12897)
     new 2f4d1acdb9 Improved: Use new Tomcat 9 maxDays Access_Log_Valve Attribute (OFBIZ-13073)

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 applications/humanres/widget/forms/EmploymentAppForms.xml         | 3 +--
 framework/base/config/log4j2.xml                                  | 8 ++++----
 framework/catalina/ofbiz-component.xml                            | 2 ++
 .../org/apache/ofbiz/catalina/container/CatalinaContainer.java    | 3 ++-
 framework/common/widget/PortalPageScreens.xml                     | 2 --
 .../java/org/apache/ofbiz/widget/model/ModelScreenWidget.java     | 1 -
 6 files changed, 9 insertions(+), 10 deletions(-)


(ofbiz-framework) 03/05: Fixed: Old error in showPortalPage screen (OFBIZ-13059)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 97564381288f0e6995b40fce01539d4083fea473
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sun Apr 28 07:43:33 2024 +0200

    Fixed: Old error in showPortalPage screen (OFBIZ-13059)
    
    There is no place where showPortalPage is used where parameters.confMode and
    parameters.usePrivate have values, no need to keep this commented out.
---
 framework/common/widget/PortalPageScreens.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/framework/common/widget/PortalPageScreens.xml b/framework/common/widget/PortalPageScreens.xml
index 64339a3551..4bf1c548c5 100644
--- a/framework/common/widget/PortalPageScreens.xml
+++ b/framework/common/widget/PortalPageScreens.xml
@@ -79,8 +79,6 @@ under the License.
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container id="portalContainerId">
-                               <!-- TODO check and if possible fix that
-                             include-portal-page id="${parameters.portalPageId}" conf-mode="${parameters.confMode}" use-private="${parameters.usePrivate}"/> -->
                             <include-portal-page id="${parameters.portalPageId}"/>
                         </container>
                     </decorator-section>


(ofbiz-framework) 01/05: Improved: minor changes

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 75dc51582d31f01d4551bf262de6b827c1b040ea
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sat Apr 27 16:41:26 2024 +0200

    Improved: minor changes
    
    In CatalinaContainer.java refers to Tomcat 9 instead of 8
    
    in EmploymentAppForms.xml removes the wrong and useless
      <entity-one entity-name="EmploymentApp" auto-field-map="true"/>
    It's the last one of this sort (found by chance in demo log like the recent
    penultimate). Those had no impact but errors in log.
---
 applications/humanres/widget/forms/EmploymentAppForms.xml              | 3 +--
 .../java/org/apache/ofbiz/catalina/container/CatalinaContainer.java    | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/applications/humanres/widget/forms/EmploymentAppForms.xml b/applications/humanres/widget/forms/EmploymentAppForms.xml
index 9e227e6664..518131f4f1 100644
--- a/applications/humanres/widget/forms/EmploymentAppForms.xml
+++ b/applications/humanres/widget/forms/EmploymentAppForms.xml
@@ -17,14 +17,13 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
     <form name="ListEmploymentApps" type="multi" list-name="listIt" use-row-submit="true" separate-columns="true" target="updateEmploymentAppExt?partyId=${partyId}&amp;&amp;referredByPartyId=${partyId}" paginate-target="FindEmploymentApps"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" >
         <actions>
             <set field="partyId" from-field="parameters.partyId"/>
             <set field="referredByPartyId" from-field="parameters.partyId"/>
-            <entity-one entity-name="EmploymentApp" auto-field-map="true"/>
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="employmentAppCtx"/>
                 <field-map field-name="entityName" value="EmploymentApp"/>
diff --git a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
index 8f562468e3..538bca472d 100644
--- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
+++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
@@ -84,7 +84,7 @@ import org.xml.sax.SAXException;
  * CatalinaContainer -  Tomcat
  *
  * For more information about the AccessLogValve pattern visit the
- * <a href="https://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve">Documentation</a>
+ * <a href="https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve">Documentation</a>
  */
 public class CatalinaContainer implements Container {
 


(ofbiz-framework) 05/05: Improved: Use new Tomcat 9 maxDays Access_Log_Valve Attribute (OFBIZ-13073)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 2f4d1acdb93c274eb94ead7890b64dd383cb3dad
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sun Apr 28 08:48:20 2024 +0200

    Improved: Use new Tomcat 9 maxDays Access_Log_Valve Attribute (OFBIZ-13073)
    
    https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve
    
    Conflict handled by hand framework/catalina/ofbiz-component.xml
---
 framework/catalina/ofbiz-component.xml                                  | 2 ++
 .../java/org/apache/ofbiz/catalina/container/CatalinaContainer.java     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/framework/catalina/ofbiz-component.xml b/framework/catalina/ofbiz-component.xml
index 85dc5ccf78..cc3c42fc43 100644
--- a/framework/catalina/ofbiz-component.xml
+++ b/framework/catalina/ofbiz-component.xml
@@ -43,6 +43,7 @@ under the License.
             <property name="access-log-rotate" value="true"/>
             <property name="access-log-prefix" value="access_log."/>
             <property name="access-log-dir" value="runtime/logs"/>
+            <property name="access-log-maxDays" value="30"/>
             <!-- uncomment for cluster support
             <property name="default-server-cluster" value="cluster">
                 <property name="rep-valve-filter">
@@ -184,6 +185,7 @@ under the License.
             <property name="access-log-rotate" value="true"/>
             <property name="access-log-prefix" value="access_log."/>
             <property name="access-log-dir" value="runtime/logs"/>
+            <property name="access-log-maxDays" value="30"/>
             <property name="enable-request-dump" value="false"/>
         </property>
         <property name="ajp-connector" value="connector">
diff --git a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
index 538bca472d..df92fed438 100644
--- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
+++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
@@ -394,6 +394,7 @@ public class CatalinaContainer implements Container {
                 accessLogValve.setPrefix(accessLogPrefix);
             }
             accessLogValve.setRotatable(ContainerConfig.getPropertyValue(engineConfig, "access-log-rotate", false));
+            accessLogValve.setMaxDays(Integer.valueOf(ContainerConfig.getPropertyValue(engineConfig, "access-log-maxDays", null)));
 
             engineValves.add(accessLogValve);
         }


(ofbiz-framework) 04/05: Improved: Rework the log4j2.xml configuration to limit the number of log files generated (OFBIZ-12897)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit f3a07162d4a3327287085dc235facc612b46e7ec
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sun Apr 28 08:46:52 2024 +0200

    Improved: Rework the log4j2.xml configuration to limit the number of log files generated (OFBIZ-12897)
    
    Changes the log4j2 config to allow 30 rollover ofbiz and 10 error log files.
    We have enough space and it's the same for any OFBIz user now.
    From my experience that can be useful to have a such backup sometimes.
---
 framework/base/config/log4j2.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/framework/base/config/log4j2.xml b/framework/base/config/log4j2.xml
index 62a10936ed..3e56ea2785 100644
--- a/framework/base/config/log4j2.xml
+++ b/framework/base/config/log4j2.xml
@@ -28,8 +28,8 @@ under the License.
        * all log messages of any severity, generated by OFBiz, are logged in the ofbiz.log file and in the console
        * all log messages of severity "error" or greater are also logged in the error.log file
 
-      Log file ofbiz.log is configured to rollover when it reaches 10MB in size, and to keep up to 9 rolled over files.
-      Log file error.log is configured to rollover when it reaches 10MB in size, and to keep up to 3 rolled over files.
+      Log file ofbiz.log is configured to rollover when it reaches 10MB in size, and to keep up to 30 rolled over files.
+      Log file error.log is configured to rollover when it reaches 10MB in size, and to keep up to 10 rolled over files.
 
       The settings in this configuration file can be changed without restarting the instance: every 60 seconds the file
       is checked for modifications.
@@ -45,7 +45,7 @@ under the License.
                 <OnStartupTriggeringPolicy/>
                 <SizeBasedTriggeringPolicy size="10 MB"/>
             </Policies>
-            <DefaultRolloverStrategy fileIndex="min" max="9"/>
+            <DefaultRolloverStrategy fileIndex="min" max="30"/>
         </RollingFile>
 
         <RollingFile name="error" fileName="runtime/logs/error.log" filePattern="runtime/logs/error.log.%i">
@@ -55,7 +55,7 @@ under the License.
                 <OnStartupTriggeringPolicy/>
                 <SizeBasedTriggeringPolicy size="10 MB"/>
             </Policies>
-            <DefaultRolloverStrategy fileIndex="min" max="3"/>
+            <DefaultRolloverStrategy fileIndex="min" max="10"/>
         </RollingFile>
 
         <Async name="async">


(ofbiz-framework) 02/05: Improved: Could not find PortalPage with portalPageId [] (OFBIZ-13071)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 146a20a0f109160e700f74a668c395523f1e1abe
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sat Apr 27 18:55:16 2024 +0200

    Improved: Could not find PortalPage with portalPageId []  (OFBIZ-13071)
    
    When a spider bot gets to certain non-sense URIs under sfa app (it seems only
    for sfa, did not dig further it's non-sense anyway) like discovered in
    trunk demo log today: <</sfa/control/setSessionTimeZone?tzId=America/Ensenada>>
    the <<Could not find PortalPage with portalPageId []>> error shows
    
    Then we don't need to clutter the log with useless error information.
    This keeps it ASAP by simply returning the portalPage if it's null.
    
    Conflict handled by hand ModelScreenWidget.java
---
 .../src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java
index c0ec6a842c..481f9fb9eb 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java
@@ -1899,7 +1899,6 @@ public abstract class ModelScreenWidget extends ModelWidget {
             if (portalPage == null) {
                 String errMsg = "Could not find PortalPage with portalPageId [" + expandedPortalPageId + "] ";
                 Debug.logError(errMsg, module);
-                throw new RuntimeException(errMsg);
             }
             return portalPage;
         }