Affects Version/s: 6.2.1 CE GA2
Fix Version/s: None
Component/s: Core Infrastructure > Util
JDK:Oracle Sun JDK 7
Application Servers:Apache Tomcat 7.0
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
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!