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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new e39358bccb Fixed: Add log information to spot correctly error during 
webapp loading
e39358bccb is described below

commit e39358bccbbe9bdae848710b6022eb44ad9f175b
Author: Nicolas Malin <[email protected]>
AuthorDate: Thu Jan 8 09:27:53 2026 +0100

    Fixed: Add log information to spot correctly error during webapp loading
    
    When OFBiz starts with a webapp that contains a bad configuration, we have 
a log information on the error but not where. To fix that we add the wepapp 
context path to know it.
---
 .../webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
index 810d1755a8..ebcd9d41b3 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
@@ -170,20 +170,23 @@ public final class WebAppUtil {
      * or anywhere else, just returns it */
     public static LocalDispatcher makeWebappDispatcher(ServletContext 
servletContext, Delegator delegator) {
         if (delegator == null) {
-            Debug.logError("[ContextFilter.init] ERROR: delegator not 
defined.", MODULE);
+            Debug.logError("[ContextFilter.init] ERROR: delegator not defined 
on "
+                    + servletContext.getContextPath(), MODULE);
             return null;
         }
         // get the unique name of this dispatcher
         String dispatcherName = 
servletContext.getInitParameter("localDispatcherName");
 
         if (dispatcherName == null) {
-            Debug.logError("No localDispatcherName specified in the web.xml 
file", MODULE);
+            Debug.logError("[ContextFilter.init] No localDispatcherName 
specified in the web.xml file on "
+                    + servletContext.getContextPath(), MODULE);
             dispatcherName = delegator.getDelegatorName();
         }
 
         LocalDispatcher dispatcher = 
ServiceContainer.getLocalDispatcher(dispatcherName, delegator);
         if (dispatcher == null) {
-            Debug.logError("[ContextFilter.init] ERROR: dispatcher could not 
be initialized.", MODULE);
+            Debug.logError("[ContextFilter.init] ERROR: dispatcher could not 
be initialized on "
+                    + servletContext.getContextPath(), MODULE);
         }
 
         return dispatcher;

Reply via email to