• 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

Read operation over URLConnection is stuck!

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We seem to have stuck at the read operation for some unknown reason.
We are trying to download a file using URLConnection.
When this code is part of our product, we see that the download is incomplete and only part of the file is read.
When the code is stuck, the last log statement that I see is "writing with totalSz".
The size of the incomplete file is random. It is not getting stuck after a constant value.

When the same code is written as a standalone program, the file is getting downloaded properly.
We ran this program in the same environment (Solaris) as our product.

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sang Pavi wrote:
When this code is part of our product, we see that the download is incomplete and only part of the file is read.
When the same code is written as a standalone program, the file is getting downloaded properly.



I don't see anything obviously wrong. What is the difference between running the code in your product and as a standalone program? Are you using an application server?
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic