Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Hello World this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

java 1.6.0.20 doesn´t error uploading files because jar version

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am using the java 1.6.0.20 version, when I try to upload a file I get the error:



I am using commons-fileupload 1.2.1.jar

¿Any clue?

Thanks
 
Ranch Hand
Posts: 227
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you also paste the code (only the part where this is failing)?
 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.

I going to explain you it better, I am trying from a .html, upload a file using a servlet. Then I´ve debug it, and no method there is run, the error comes from a jar version or classpath, because I´ve researched on the net, but I don´t find the exact reason.

I going to paste the servlet code below:



And below the .html code:




And the trace is as follows:




Any help would highly appretiated. Thanks
 
Aditya Jha
Ranch Hand
Posts: 227
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the commons-fileupload JAR is acting rather funny. Try to find if there are multiple versions of this JAR file on your system. Also, try replacing this JAR in your application with a freshly downloaded JAR.
 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi it´s very fun because it works well if I run it(upload.html) alone but it´s call from an .xhtml file and in that case the error happens.

I going to postg it in the JSF post too.

Thanks
 
Sheriff
Posts: 21862
105
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I've closed that one. UseOneThreadPerQuestion.

If you believe the problem is JSF related I'll move this thread to the JSF forum.
 
please buy this thing and then I get a fat cut of the action:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!