Issue Details (XML | Word | Printable)

Key: LEP-6479
Type: Bug Bug
Status: Reopened Reopened
Priority: Critical Critical
Assignee: SE Support
Reporter: andrea
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Old Liferay Portal (Use Liferay Portal Standard Edition)

Upload with external struts portlet work on Windows and not in Linux (RedHat 5 Ent., Ubuntu 8.0.4)

Created: 01/Jul/08 01:48 AM   Updated: 06/Jul/08 08:06 AM
Component/s: None
Affects Version/s: 4.4.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Win Vista, Jboss, MySql work fine
Linux RedHat, Jboss, MySql dont work


 Description  « Hide
List items = servletFileUpload.parseRequest(req);

All time i try to upload a file by an external portlet(struts) , size items is zero.
In debug mode all work fine on windows whereas when debug on Linux parseRequest return e List with 0 element.

Are there any solutions? Same problem was in Liferay 4.3 and now in StrutsPortlet Liferay 5.

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
andrea added a comment - 01/Jul/08 01:59 AM - Visible to
RedHat is 64 bit and Ubuntu 32 bit.
Is a Liferay problem? a bridge struts problem? common upload library?

Req is full before to enter in parseRequest but result is List size 0.

For example using sample struts portlet:

2008-07-01 10:00:26,309 INFO [STDOUT] 1. ------>host
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>www.xxxxx.xx:5000
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>user-agent
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>accept
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>accept-language
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
2008-07-01 10:00:26,316 INFO [STDOUT] 1. ------>accept-encoding
2008-07-01 10:00:26,316 INFO [STDOUT] 2. ------>gzip,deflate
2008-07-01 10:00:26,316 INFO [STDOUT] 1. ------>accept-charset
2008-07-01 10:00:26,316 INFO [STDOUT] 2. ------>ISO-8859-1,utf-8;q=0.7,*;q=0.7
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>keep-alive
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>300
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>connection
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>keep-alive
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>referer
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>http://www.xxx.xx:5000/web/guest/home?p_p_id=sample_struts_portlet_WAR_struts2&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_sample_struts_portlet_WAR_struts2__spage=%2Fportlet_action%2Fsample_struts_portlet%2Fupload%2Frender
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>cookie
2008-07-01 10:00:26,327 INFO [STDOUT] 2. ------>JSESSIONID=947F2E4291518349137355412E2189FB; GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>content-type
2008-07-01 10:00:26,327 INFO [STDOUT] 2. ------>multipart/form-data; boundary=---------------------------5436261537937
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>content-length
2008-07-01 10:00:26,328 INFO [STDOUT] 2. ------>169795
2008-07-01 10:00:26,328 INFO [STDOUT] Dimensioni di ITEMS : --------------> 0

andrea added a comment - 01/Jul/08 05:47 AM - Visible to
This problem happen when we use struts liferay portlet and portlet whereas if we use jspportlet all work well on linux and windows.
is there some probability that all depend from struts bridge? How can i solve this problem or bug?

Christoph Hermann added a comment - 06/Jul/08 08:06 AM - Visible to
I have the same problem. The Upload which worked fine in Liferay 4.4.1 is not working anymore in Liferay 5.0.1.
Please provide a fix to this ASAP, this is really critical.

The following code illustrates the problem:

------------
DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setRepository(new File("/tmp/"));
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
List<FileItem> items = (List<FileItem>) upload.parseRequest(httpRequest);
if (items != null) {
  _log.debug("Found " + items.size() + " file items in the request");
} else {
  _log.debug("Found no file items in the request");
}
------------
This always returns 0 items.

See also http://support.liferay.com/browse/LEP-6412