GeeCON Prague 2014*
The moose likes JSF and the fly likes Excel number of rows limit for Richfaces <rich:fileUpload> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Excel number of rows limit for Richfaces <rich:fileUpload>" Watch "Excel number of rows limit for Richfaces <rich:fileUpload>" New topic
Author

Excel number of rows limit for Richfaces <rich:fileUpload>

Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Hello folks!!!

I've been running into a problem whose solution is not apparent, and Google searches have been useless so far.

The Richfaces component <rich:fileUpload> allows us to upload files from the client machine to the server. A couple of settings may be set through its attributes such as "maxFilesQuantity", "listHeight", "acceptedTypes", etc.

The size per file is something defined in the web.xml, the


I can vary that size without problems, the problem is that if I upload a spreadsheet with 20 rows, the operation completes successfully. However, if the number of rows is, let's say, 3000, the operation fails, the message "An error occurred" is returned.

Has anyone ever experienced such a problem?

Thanks in advance!


DJ aspirant, Engineering undergraduate, Tokusatsus addicted, fond of English language and Asia's, Buddhist, blogger, etc. I'll need to insert all these attributes in a Java class and manage to create methods for handling my overwhelming life
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

What problem?
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

The upload does not happen with a spreadsheet with a large number of rows, such as 3000.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

That parameter says "Do not allow uploads of more than 1,000,000 bytes". It's possible that a spreadsheet with 3,000 rows could be larger than that size.
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Thanks for the answer, but I guarantee it's not that, the file does not reach even 500Kb with that amount of rows.

Any other ideas?

Thanks!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

How big is the file, then?
Marcos Silvestri
Ranch Hand

Joined: Dec 06, 2009
Posts: 62

Just returned from my lunch time...

Actually, the size of the file is 850KB. Around 500KB was a test I had done with an intermediate number of rows.

Much to my surprise, it is working now... what have I done to fix it? It's simple, I have no idea, I just added some attributes to the fileUpload tag which are not a must for it to work (at least it is not mentioned anywhere) and it began to work. The attributes are:

cancelEntryControlLabel, clearAllControlLabel, clearControlLabel, doneLabel, progressLabel, sizeErrorLabel, stopControlLabel, stopEntryControlLabel, transferErrorLabel,
uploadControlLabel, and addControlLabel.


Also, I added the snipet



and it is working now.

It's such a mystery, but it's the outcome is the desired one.

Thanks for the help Paul, cheers from Brazil!



[Thumbnail for Upload.png]

 
GeeCON Prague 2014
 
subject: Excel number of rows limit for Richfaces <rich:fileUpload>