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

Large jpg image is not adapted, image not displayed in UI

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 7.0.X, 7.1.0 Beta 3, 7.1.X, Master
    • Fix Version/s: None
    • Component/s: Adaptive Media
    • Labels:
    • Story Points:
      1
    • Fix Priority:
      4
    • Last Working Version:

      Description

      I use image https://unsplash.com/photos/B1MvWUq7b5I
      Automatically extracted metadata contains Content Type: image/jpeg

      Steps to reproduce:

      1. Add large image (bigger than 10MB) to Documents and Media

      Actual Result >
      Image is not displayed in liferay, missing small preview.
      In liferay log:

      Exception is for PNG file, but image have extension .jpg and have content type image/jpeg

      2018-06-18 17:46:27.140 ERROR [http-nio-8080-exec-8][PortletServlet:112] javax.portlet.PortletException: javax.imageio.IIOException: I/O error writing PNG file!
      javax.portlet.PortletException: javax.imageio.IIOException: I/O error writing PNG file!
              at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCResourceCommand.serveResource(BaseMVCResourceCommand.java:49)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callResourceMethod(MVCPortlet.java:442)
              at com.liferay.portal.kernel.portlet.LiferayPortlet.serveResource(LiferayPortlet.java:141)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.serveResource(MVCPortlet.java:342)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:149)
              at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:85)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:143)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:78)
              at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              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:118)
              at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.forward(RequestDispatcherAdaptor.java:40)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:656)
              at com.liferay.portlet.InvokerPortletImpl.invokeResource(InvokerPortletImpl.java:780)
              at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:599)
              at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.serveResource(MonitoringInvokerPortlet.java:305)
              at com.liferay.portlet.PortletContainerImpl._serveResource(PortletContainerImpl.java:956)
              at com.liferay.portlet.PortletContainerImpl.lambda$serveResource$4(PortletContainerImpl.java:242)
              at com.liferay.portlet.PortletContainerImpl._preserveGroupIds(PortletContainerImpl.java:378)
              at com.liferay.portlet.PortletContainerImpl.serveResource(PortletContainerImpl.java:235)
              at com.liferay.portlet.SecurityPortletContainerWrapper.serveResource(SecurityPortletContainerWrapper.java:205)
              at com.liferay.portlet.RestrictPortletContainerWrapper.serveResource(RestrictPortletContainerWrapper.java:150)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.serveResource(PortletContainerUtil.java:189)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:375)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:172)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
              at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
              at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
              at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:605)
              at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:582)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
              at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:355)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:98)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.frontend.compatibility.ie.servlet.filter.IEMimeTypeCompatibilityFilter.processFilter(IEMimeTypeCompatibilityFilter.java:56)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:364)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:261)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:263)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
              at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
              at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
              at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
              at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
              at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: javax.imageio.IIOException: I/O error writing PNG file!
              at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)
              at javax.imageio.ImageWriter.write(ImageWriter.java:615)
              at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
              at javax.imageio.ImageIO.write(ImageIO.java:1578)
              at org.jfree.chart.encoders.SunPNGEncoderAdapter.encode(SunPNGEncoderAdapter.java:127)
              at org.jfree.chart.encoders.EncoderUtil.writeBufferedImage(EncoderUtil.java:134)
              at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:185)
              at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:136)
              at com.liferay.server.admin.web.internal.portlet.action.ViewChartMVCResourceCommand.doServeResource(ViewChartMVCResourceCommand.java:108)
              at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCResourceCommand.serveResource(BaseMVCResourceCommand.java:41)
              ... 148 more
      Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer
              at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:333)
              at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:748)
              at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:653)
              at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:368)
              at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:346)
              at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
              at com.liferay.portal.kernel.internal.servlet.RestrictedByteArrayCacheOutputStream.write(RestrictedByteArrayCacheOutputStream.java:133)
              at com.liferay.portal.kernel.servlet.ServletOutputStreamAdapter.write(ServletOutputStreamAdapter.java:59)
              at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:255)
              at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196)
              at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254)
              at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945)
              at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158)
              ... 157 more
      Caused by: java.io.IOException: Connection reset by peer
              at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
              at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
              at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
              at sun.nio.ch.IOUtil.write(IOUtil.java:65)
              at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
              at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
              at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
              at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
              at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1184)
              at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:691)
              at org.apache.tomcat.util.net.SocketWrapperBase.writeBlocking(SocketWrapperBase.java:471)
              at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:409)
              at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.doWrite(Http11OutputBuffer.java:530)
              at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:112)
              at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:189)
              at org.apache.coyote.Response.doWrite(Response.java:603)
              at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:328)
              ... 169 more
      
      

      Expected Result >
      Make image adaptation

      Priority L3 + S4 = 4 

      Reproducible:

      • Liferay 7.1 beta 3 DXP, DB2, Ubuntu 16.04
      • Liferay 7.1.x 75339f85a4c499c8756c4764740b52f64401e9ca, Mysql, CentOS

      Not Reproducible:
      7.0.6 GA7

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 7 weeks, 4 days ago

                Packages

                Version Package