Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70804

'Unable to find /navigation/page.jsp in the context /o/site-navigation-taglib' WARN message keeps appearing if log levels are increased

    Details

      Description

      Summary

      We have identified that the customer has increased log levels for com.liferay.taglib.util.IncludeTag to WARN for their debugging purposes. Before installing DE-10 (i.e. in DE-9), they never received any WARN messages from this component. After installing DE-10, they have noticed that they consistently get the following message on every action (e.g. page access, sign in, clicking on something):

      16:34:03,895 WARN [http-nio-9080-exec-9][IncludeTag:464] Unable to find /navigation/page.jsp in the context /o/site-navigation-taglib.

      It seems that something has changed from DE-9 to DE-10 to warrant this WARN message. The only reason that it is not visible is because Liferay DXP's default log levels suppress these messages. If we look at the default portal-log4j.xml in portal-impl.jar, we will see that this class is not defined explicitly (i.e. there isn't an entry for com.liferay.taglib.util.IncludeTag).

      Since com.liferay.taglib.util.IncludeTag or its parents (e.g. com.liferay.taglib.util or com.liferay.taglib) are not defined in portal-log4j.xml, this falls under com.liferay which only reports ERROR messages:

      <category name="com.liferay">
      		<priority value="ERROR" />
      	</category>

      This is the reason why in a clean DXP + DE-10 environment, this message never appears. However, if we set up log levels to WARN for com.liferay.taglib.util.IncludeTag, these messages will appear in DE-10.

      Steps to Reproduce for DXP
      1. Set up clean DXP + DE-10 bundle
      2. Create portal-log4j-ext.xml in {{$TOMCAT_HOME/webapps/ROOT/WEB-INF/classes
      3. Add the following into the portal-log4j-ext.xml:

      <?xml version="1.0"?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
      
      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
      	<appender class="org.apache.log4j.ConsoleAppender" name="CONSOLE">
      		<layout class="org.apache.log4j.EnhancedPatternLayout">
      			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}:%L] %m%n" />
      		</layout>
      	</appender>
      
      	<appender class="org.apache.log4j.rolling.RollingFileAppender" name="TEXT_FILE">
      		<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      			<param name="FileNamePattern" value="@liferay.home@/logs/liferay@spi.id@.%d{yyyy-MM-dd}.log" />
      		</rollingPolicy>
      
      		<layout class="org.apache.log4j.EnhancedPatternLayout">
      			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}:%L] %m%n" />
      		</layout>
      	</appender>
      
      	<appender class="org.apache.log4j.rolling.RollingFileAppender" name="XML_FILE">
      		<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      			<param name="FileNamePattern" value="@liferay.home@/logs/liferay@spi.id@.%d{yyyy-MM-dd}.xml" />
      		</rollingPolicy>
      
      		<layout class="org.apache.log4j.xml.XMLLayout">
      			<param name="LocationInfo" value="true" />
      		</layout>
      	</appender>
      
      	<category name="com.liferay">
      		<priority value="WARN" />
      	</category>
      
      	<root>
      		<priority value="INFO" />
      		<appender-ref ref="CONSOLE" />
      		<appender-ref ref="TEXT_FILE" />
      		<appender-ref ref="XML_FILE" />
      	</root>
      </log4j:configuration>

      4. Start up the app server
      5. Wait for server start up, then try clicking around (sign in, go to different parts of Liferay)

      Steps to Reproduce for Master/70x
      1. Start up the app server
      2. Go to Server Configuration
      3. Change log levels for com.liferay to WARN
      4. Navigate to default site's page

      Actual Result
      Notice the WARN messages that appear related to TagLib

      Expected Result
      No WARN messages regarding a "Unable to find /navigation/page.jsp" are printed. Or, if the log level is activated to WARN, they should not even be suppressed.

      Reproduced In

      • DXP + DE-10
      • master (c900d66c217a8ba062af7bb5a1ad7805b2855e98)
      • ee-7.0.x (b1e26fbd26025fd155ff30781bf71d00865b48ba)

      Fixed In

      • DXP + DE-9

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 33 weeks ago

                Packages

                Version Package
                7.0.0 DXP SP2
                7.0.0 DXP FP13
                7.0.0 DXP SP3
                7.0.3 CE GA4
                7.1.X
                Master