<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Exception on log when trying to view PDF found on search</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121138815" />
  <subtitle>Exception on log when trying to view PDF found on search</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121138815</id>
  <updated>2026-06-13T13:37:40Z</updated>
  <dc:date>2026-06-13T13:37:40Z</dc:date>
  <entry>
    <title>RE: Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121145395" />
    <author>
      <name>Manuel Castro</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121145395</id>
    <updated>2021-09-13T18:43:33Z</updated>
    <published>2021-09-13T18:43:32Z</published>
    <summary type="html">&lt;p&gt;Yes, the D&amp;amp;M Widget works well by itself.&lt;/p&gt;
&lt;p&gt;The problem only shows up on the default search page. Apparently when
  the Search Results Widget tries to delegate the preview action to the
  D&amp;amp;M widget, it fails.&lt;/p&gt;
&lt;p&gt;I've tested with 7.4 GA3 and it works well. It's probably some bug
  they didn't catch in 7.3. I was hoping someone would have a workaround...&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</summary>
    <dc:creator>Manuel Castro</dc:creator>
    <dc:date>2021-09-13T18:43:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121145003" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121145003</id>
    <updated>2021-09-13T13:15:32Z</updated>
    <published>2021-09-13T13:15:32Z</published>
    <summary type="html">&lt;p&gt;Interestingly, it works as expected for me on 7.3.7-ga8. I upload a
  PDF through the content &amp;amp; Admin &amp;gt; Documents and Media app:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Test search and preview, and it works.&lt;/li&gt;
  &lt;li&gt;Add a D&amp;amp;M widget to a page, enable &amp;quot;show actions&amp;quot;
    check box. test search and preview, it workls (the acitons buttons
    are displayed) in the search preview).&lt;/li&gt;
  &lt;li&gt;Disable the &amp;quot;show actions&amp;quot; checkbox, search and preview,
    and it still works (preview shown but no actions buttons in the
    preview window). This scenario I tested with the default
    administrative user, another site member user, and as a gues (unauthenticated).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2021-09-13T13:15:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121144964" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121144964</id>
    <updated>2021-09-13T12:25:14Z</updated>
    <published>2021-09-13T12:25:13Z</published>
    <summary type="html">&lt;p&gt;About &lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt; I added these files through the left menu / content / documents
    &amp;amp; media. I have a page where I display a Documents &amp;amp; Media
    portlet but it has the &amp;quot;Show actions&amp;quot; checkbox disabled.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If you re-enable the &amp;quot;show actions&amp;quot; setting, does the issue
  go away?&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2021-09-13T12:25:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121144501" />
    <author>
      <name>Manuel Castro</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121144501</id>
    <updated>2021-09-13T09:01:25Z</updated>
    <published>2021-09-13T07:31:54Z</published>
    <summary type="html">&lt;p&gt;Hi Russell,&lt;/p&gt;
&lt;p&gt;Thanks for your input.&lt;/p&gt;
&lt;p&gt;1. I added these files through the left menu / content / documents
  &amp;amp; media. I have a page where I display a Documents &amp;amp; Media
  portlet but it has the &amp;quot;Show actions&amp;quot; checkbox disabled.&lt;/p&gt;
&lt;p&gt;2. Disabling &amp;quot;Display Selected Result in Context&amp;quot; or
  changing any of the other checkboxes doesn't affect the result, unfortunately;&lt;/p&gt;
&lt;p&gt;I'm reasonably sure that this was working whan I setup the website
  and demoed it; this seems to have started only a few days after that,
  when a coleague was loading more files into the folders.&lt;/p&gt;
&lt;p&gt;M&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;EDIT: I just installed a fresh 7.3 GA8 on my machine, uploaded some
  documents and the problem is there. I'm no longer sure this problem
  appeared later. Maybe I didn't test this situation exactly. :-(&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Manuel Castro</dc:creator>
    <dc:date>2021-09-13T07:31:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121139089" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121139089</id>
    <updated>2021-09-13T11:39:07Z</updated>
    <published>2021-09-10T19:38:45Z</published>
    <summary type="html">&lt;p&gt;Hi Manuel, 2 questions to start with:&lt;/p&gt;
&lt;p&gt;1. Did you add the DLFileEntries for these PDFs programmatically or
  through the Documents and Media application?&lt;/p&gt;
&lt;p&gt;2. What happens if you go into the Search Results widget configurtion
  and disable &lt;em&gt;Display Selected Result in Context&lt;/em&gt;?&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2021-09-10T19:38:45Z</dc:date>
  </entry>
  <entry>
    <title>Exception on log when trying to view PDF found on search</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121138814" />
    <author>
      <name>Manuel Castro</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121138814</id>
    <updated>2021-09-10T17:02:24Z</updated>
    <published>2021-09-10T16:09:46Z</published>
    <summary type="html">&lt;p&gt;Hi guys&lt;/p&gt;
&lt;p&gt;I built a small site using 7.3.7 CE GA8 and all was going well. &lt;/p&gt;
&lt;p&gt;Suddendly I can't view PDFs found through the search page. When I
  search something, the PDFs come up on the list but when I click on the
  link, the preview doesn't show up. &lt;/p&gt;
&lt;p&gt;On catalina.out, I get these exceptions:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;2021-09-10 15:58:36.898 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/guest/pesquisa?p_p_id=com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet&amp;amp;p_p_lifecycle=0&amp;amp;p_p_state=maximized&amp;amp;p_p_mode=view&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_mvcPath=%2Fview_content.jsp&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_assetEntryId=37947&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_type=document&amp;amp;p_l_back_url=%2Fgroup%2Fguest%2Fpesquisa%3Fq%3Dsornar generates exception: java.lang.NullPointerException
java.lang.NullPointerException
    at org.apache.jsp.document_005flibrary.info_005fpanel_005ffile_005fentry_jsp._jspService(info_005fpanel_005ffile_005fentry_jsp.java:557)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:368)
    at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:380)
    at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
    at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
    at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
    at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
    at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
    at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:407)
    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:383)
    at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:217)
2021-09-10 15:58:36.901 ERROR [http-nio-8080-exec-2][IncludeTag:128] Current URL /group/guest/pesquisa?p_p_id=com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet&amp;amp;p_p_lifecycle=0&amp;amp;p_p_state=maximized&amp;amp;p_p_mode=view&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_mvcPath=%2Fview_content.jsp&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_assetEntryId=37947&amp;amp;_com_liferay_portal_search_web_search_results_portlet_SearchResultsPortlet_type=document&amp;amp;p_l_back_url=%2Fgroup%2Fguest%2Fpesquisa%3Fq%3Dsornar generates exception: java.lang.NullPointerException
java.lang.NullPointerException
    at com.liferay.document.library.web.internal.display.context.logic.DLPortletInstanceSettingsHelper.isShowActions(DLPortletInstanceSettingsHelper.java:121)
    at org.apache.jsp.document_005flibrary.view_005ffile_005fentry_jsp._jspService(view_005ffile_005fentry_jsp.java:947)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:368)
    at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:380)
    at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
    at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
    at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
    at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
    at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
    at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:407)
    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:383)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;When I use the back-office search (through the menu Content /
  Documents &amp;amp; Media, everything works OK. &lt;/p&gt;
&lt;p&gt;Thanks a lot for any ideas&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I've looked into the source-code at github and, if I'm not mistaken,
  the problem is that _dlRequestHelper is null ...?&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;public boolean isShowActions() {
		String portletName = _dlRequestHelper.getPortletName(); // Line 121 of the 7.3.7 GA8 version
		String portletResource = _dlRequestHelper.getPortletResource();

		if (portletName.equals(DLPortletKeys.DOCUMENT_LIBRARY_ADMIN) ||
			portletName.equals(PortletKeys.MY_WORKFLOW_TASK) ||
			portletResource.equals(DLPortletKeys.DOCUMENT_LIBRARY_ADMIN) ||
			portletResource.equals(PortletKeys.MY_WORKFLOW_TASK)) {

			return true;
		}

		DLPortletInstanceSettings dlPortletInstanceSettings =
			_dlRequestHelper.getDLPortletInstanceSettings();

		return dlPortletInstanceSettings.isShowActions();
	}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Am I reading this well? What can I do?&lt;/p&gt;</summary>
    <dc:creator>Manuel Castro</dc:creator>
    <dc:date>2021-09-10T16:09:46Z</dc:date>
  </entry>
</feed>
