File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Marcos Silvestri
Ranch Hand
Posts: 62
Chrome Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Paul Clapham
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problem?
 
Marcos Silvestri
Ranch Hand
Posts: 62
Chrome Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The upload does not happen with a spreadsheet with a large number of rows, such as 3000.
 
Paul Clapham
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
Chrome Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How big is the file, then?
 
Marcos Silvestri
Ranch Hand
Posts: 62
Chrome Java Mac
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
Upload.png
Upload in action
[Thumbnail for Upload.png]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic