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

Update Logo Method in LayoutSetLocalServiceUtil throws exception with Amazon S3

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.2.1 CE GA2
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      3
    • JDK:
      Oracle Sun JDK 7
    • Application Servers:
      Apache Tomcat 7.0
    • Databases:
      MySQL 5.5

      Description

      Hello,

      I think I found a bug in one component of the Utils on liferay. I am developing a small portlet to allow users to change their site logo. The portlet functionality is just select a file and click on upload. The portlet should updateLogo with LayoutSetLocalServiceUtil.updateLogo and that's it. The portlet worked for some time until I moved the File Store System from File System to Amazon S3. The updateLogo module doesn't work anymore throwing an exception of:

      13:26:36,677 ERROR [http-bio-8080-exec-58][PortletServlet:116] javax.portlet.PortletException: com.liferay.portal.kernel.exception.SystemException: org.jets3t.service.S3ServiceException: Failed to initialize a SAX XMLReader
      javax.portlet.PortletException: com.liferay.portal.kernel.exception.SystemException: org.jets3t.service.S3ServiceException: Failed to initialize a SAX XMLReader
      at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:166)

      The error only happens when you have your document store in Amazon S3. Otherwise the portlet works fine.

      I tried then to upload the image myself using the ImageLocalServiceUtil.updateImage method, finding out that the problem repeats on that method, so I think the issue is located in this util and the updateLogo fails because of the ImageLocalServiceUtil.

      I am attaching a WAR file of my portlet so you can see the issue for yourselves. Please don't hesitate to contact me, I'll gladly assist you.

      Steps to reproduce:

      1. Use a system without Amazon S3 document store
      2. Create or use my portlet to change the Site Logo with LayoutSetLocalServiceUtil.updateLogo
      3. install portlet on a site
      4. upload file -> It works!
      5. Use a system with Amazon S3 document Store
      6. Install portlet on site
      7. Try to upload file -> It fails!

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            ErnestoV Ernesto Vanegas
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              6 years, 41 weeks, 1 day ago

                Packages

                Version Package