Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java 1.6.0.20 doesn´t error uploading files because jar version  RSS feed

 
Dura Hurtado
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
 
Aditya Jha
Ranch Hand
Posts: 227
Eclipse IDE Java Spring
  • 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 Java Spring
  • 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
 
Rob Spoor
Sheriff
Posts: 21019
85
Chrome Eclipse IDE Java 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.
 
Acetylsalicylic acid is aspirin. This could be handy too:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!