• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

binary file upload problem with jakarta

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read in the javaranch discussions that you can upload any file of any type but that doesn't work for me.
Upload simple text files works fine , even large ones. I have tried uploading jpg and xls files.
This is the error i get when running in Netscape:
A network error occurred while Netscape was sending data.
(Network Error: Connection aborted)
This is the error I get when running in Internet Explorer:
java.io.IOException: unexpected end of part
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.io.IOException.(Compiled Code)
at com.oreilly.servlet.multipart.PartInputStream.fill(Compiled de)
at com.oreilly.servlet.multipart.PartInputStream.read(Compiled Code)
at com.oreilly.servlet.multipart.PartInputStream.read(Compiled Code)
at com.oreilly.servlet.multipart.FilePart.write(Compiled Code)
at com.oreilly.servlet.multipart.FilePart.writeTo(Compiled Code)
at com.oreilly.servlet.MultipartRequest.(Compiled Code)
at Upload2.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
When I run the same servlet on my local machine using the jswdk server it works fine. But the reason could be that it runs on my local machine ...
Can anyone help ??
I'm running my servlet on an Apache/Jakarta unix machine .
We are running the following versions:
- AIX 4.3.3.0
- IBM HTTPServer powered by apache
- Java 1.1.8
- TOMCAT Version 3.2.1
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I just found the solution. It seems there is a bug in the version of Tomcat that I am currently running (3.2.1) that causes this problem. 3.2.2 fixes it and I have tried a workaround for the current release which seems to work also. (using ajp12 instead of
ajp13)
I found the information in http://w6.metronet.com/~wjm/tomcat/2001/Apr/msg00656.html
I hope this information is usefull for someone else trying to run servlets, because it is difficult to know in which forums/usergroups to search for problems like this.
reply
    Bookmark Topic Watch Topic
  • New Topic