Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

URLConnection throws EOFException

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following code snippet works fine when it is run as a standalone program on my Linux machine. When run as a servlet under tomcat 5, it throws: java.io.EOFException : unexpected end of input stream.

Now if I run it as a servlet on my Windows machine it works fine.

Windows
Tomcat 5.5
JVM : 1.4.2_11

Linux
Tomcat 5
JVM 1.4.2_05

The exception started happening after we installed a new Linux kernel including jvm and tomcat5. Could the different versions of jvm or tomcat (they are pretty close)be the problem, or do you think it is with Linux?

try {
serviceURL="https://trans.sym...........
URL u = new URL(serviceURL);
URLConnection connection = / u.openConnection();
connection.setDoInput(true);
connection.setDoOutput(false);
InputStream is = connection.getInputStream();
return is;
} catch(Exception anything) {
System.out.println(anything);
}
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic