Submitted On 13-JUN-2000
wolfgangmeisl
I get the same problem with 1.3.0-C. The call to
URLConnection.getInputStream() hangs until the request
finishes. Works fine with 1.2.2_005.
I am unable to do HTTP streaming or progressive loading with
1.3.0
Submitted On 18-AUG-2000
BRoman
I've reduced the problem to a reasonably small test case,
which I'd be glad to forward on request. What I find really
peculiar is that getInputStream blocks if I let Apache
generate the HTTP headers itself, but if I run my CGI as "no
protocol headers" and generate the same header information
in the CGI, getInputStream doesn't block!
Version information:
$ java -version
java version "1.3.0beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.3.0beta_refresh-b09)
Java HotSpot(TM) Client VM (build 1.3.0beta-b07, mixed mode)
Submitted On 18-AUG-2000
dpr
... just wanted to confirm that I have encountered the same
problem ... I'm doing a database query by invoking a CGI
script using a URLConnection and would like to be able to
interrrupt it ... but because getInputStream() does not
return until
the response is complete, I have no place to check for an
interrupt exception
... thanks in advance for any suggestions ...
Don
Submitted On 02-OCT-2000
SAOJ
Please Sun. This is a very bad bug, since we need this to
go thru firewalls with Java.
This will make the task of using URLConnection with keep-
alive impossible !!!
Submitted On 25-OCT-2000
igor_irina
Sun, this is so disappointing...
It's a BUG, not a request for enhancements, and it takes
you more than half a year to fix.
All java versions prior to 1.3 had functionality
that enabled a WHOLE CLASS of streaming applications.
Now it's BROKEN. What am I supposed to tell my customers
when Netscape 6 goes out? Don't use it?
Submitted On 27-OCT-2000
hemblem
I've encountered the same problem, too. Please fix this bug!
Submitted On 31-OCT-2000
BRoman
This WORKED in 1.2.2, and is BROKEN in 1.3. This REGRESSION
is a BUG. It means (at a minimum) a major redesign of our
product to produce something that won't work nearly as well.
If this is true after all the development we've put into it,
I can guarantee we will NEVER USE JAVA for another product.
Over two months ago I offered assistance in reproducing this
BUG. The offer still stands. If "xxxxx@xxxxx" would kindly
contact me, I'd be glad to supply my test case and any other
information that might help.
Sorry for shouting... but can you sense my frustration?
Submitted On 10-NOV-2000
minfan
Yes, we got the same problem with our application. The
applet can't get an input stream to a server side CGI
script until the script finishes all the response. And the
same application is working for 1.2.2.
Submitted On 21-NOV-2000
smithk10
C# is coming - and sooner than you can say "Sun fixed that
Java bug" (while remaining truthful).
Submitted On 29-NOV-2000
zenyatta
Sun should keep a separate bug list for newly introduced inconsistencies such as this. Regardless of how
many people vote for this one, a bug that breaks existing client/server apps with no workaround is way
more serious than some fillRect () thread safety issue.
Submitted On 21-DEC-2000
bgrier
The odd thing is my HTTP streaming applet does work in
Netscape 6.0 but not when using the same plug-in in IE,
Netscape 4.7x or Opera. What's the story?
Submitted On 29-DEC-2000
jessh
Robust HTTP/HTTPS handling is a key component of Java
(another being high-quality platform independent UI
components). It is thus essential that bugs in this area
be fixed ASAP!
Submitted On 01-JAN-2001
amartino2
I'm in the process of scrapping my URLconnections and using
Socket instead. Works fine. But it's a stupid bug
nonetheless. This should not have happened and should be
fixed by now.
Submitted On 03-JAN-2001
bobpf
I am getting the same problem which is major in my case and
I will be forced to write some kind of cheesy work around.
This bug should be fixed ASAP!
Submitted On 19-JAN-2001
yoszu
I'm from the FileNotFoundException <- getInputStream() community
What helped me was using HTTPClient in place of the java.net.HttpURLConnection class. Get it at,
http://www.innovation.ch/java/HTTPClient/
For my *much* longer post see "Applets+Plug-in+Proxy=HTTP connect fails" in the Java Plug-in forum at the
JDC
Submitted On 15-FEB-2001
oertelh
Sun must be kidding to not release a service release that
fixes the bug in a matter of days! Bugs like this make Java
an awful platform for serious HTTP development.
Submitted On 18-FEB-2001
JWiedmann
A possibly simpler workaround would be to make the
clients protocol version configurable. For example
the HttpURLConnection class might have a method
setProtocolVersion(String ver) with ver="1.1" by default.
Submitted On 13-MAR-2001
pdeepak
I am having the same problem, and also if the network is
down the readline call of the BufferedReader to the
URLConnections input stream never returns, neither it
throws any exception, the client applet just seems like
hanged !
-Deeps
Submitted On 19-MAR-2001
mattpe
I have the same problem connecting back to tomcat 3.2.2
from an applet. Here is a dodgy workaround.
1.In your applet start a new thread that creates an
URLConnection and calls getInputStream(). This thread will
block forever according to the bug report.
2. In your original thread, create another URLConnection
and call getInputStream(). This function call now returns
as expected.
3. You can stop() the blocked Thread if you want.
I have no idea why this works.
Submitted On 01-MAY-2001
JWiedmann
Another workaround not dependent on Apache is that the
client adds a header "TE: identity". This should force
the server not to use chunked encoding while still
enabling other features of HTTP/1.1. This works with
TomCat, but for example not with iPlanet 4. IMO it should
work with any HTTP/1.1 compliant server.
Submitted On 17-MAY-2001
bkbonner
I'm seeing this to as I stream progress back to the client
from a lengthy query. I've tried: BrowserMatch "Java1\.3\.
[0-1]" downgrade-1.0 on the IBM HTTP Server (Apache), but I
can't get it to work. My next thought is a sniffer, but
this doesnt help with IIS 4.0. Thanks, Brian
Submitted On 27-JUN-2001
unraveler
Would anybody care to explain slightly more in detailed
that browsermatch tag. I can't get it to work only for
Java 1.3 with "Java1\.3\.[0-1]" but it does work when using
the variable "Java".
Submitted On 20-AUG-2001
joshdmoore
I think i am running into the same problem, except
sometimes mine never returns. I just stays at
getInputStream. I dont have any control over the http
server that is giving me the html page. What can i do?
Submitted On 18-OCT-2001
stalin
I notice a similar thing but instead with an SSL session.
With the Java1.3.0, the getInputStream doesn't block and
allows client applets to read streamed data. But with
Java1.3.1, the problem exists..the applet halts until the
socket is closed...and at that point the plugin JVM
releases the buffered data to the client.
I don't think Apache is at fault here as the status line in
Netscape clearly shows that it's reading more and more
bytes (due to the streaming data). So the Java1.3.1 Plugin
JVM is just not releasing it to the client code.
Sun, what has changed in the SSL implementations with these
plugin versions?
Also, on a minor note, the User-Agent is set
to "Mozilla..." within an SSL session but is "Java1.3.0..."
in a non-SSL session..making it harder when using the
BrowserMatch directive.
I'm running the said plugins on Win2K on Netscape
Communicator 4.78 with Apache 1.3.2/Tomcat 3.2.3 on HP-UX
11.x
Stalin D'Souza
sdsouza@siac.com
Submitted On 05-NOV-2001
SPHIX
Indeed when writing a more powerfull server under Solaris the bug is much more severe than it is described as here especially when dealing with huge amounts of data in multiple threads.
1. The JVM is consuming 100% of the CPU while waiting for response on getInputStream. Forget about performance of the whole system. Indeed there are such incredible effects out of bad performance that the system behaviour becomes quite unpredictable
2. The whole amount of data is buffered and this is a problem with 50 threads reveiving 50Mb each. It is not clear what the maximum amount of memory allow to the JVM should be a gig or two, more... despite the efforts to make realy neat stream processing with as little overhead as possible
BUT indeed there is a soilution to the problem (not all people are as sloppy and dump as Sun) check out the HTTPClient it offers Streaming of both send and receive indeed with very little patching of code I were able to troubleshoot the incredibly bad problems created by the core Sun technology
Submitted On 14-NOV-2001
chelsel
Can't we have a patch for 1.3 to include this fix?? It's
extremely important for any type of streaming content
handling on the client.
Submitted On 15-NOV-2001
chelsel
Just want to mention that I'm using the HTTPClient package
from innovation.ch and it seems to work very well. At
least it doesn't stop my development while I wait for JDK
1.4. A bonus, it includes the full source so if there's a
problem I can fix it myself...
Submitted On 03-JAN-2002
dragos_ilie
For Apache/JServ I have fixed this problem by explicitly
setting the Content-Length variable using
HttpServletResponse.setHeader() method. However this did not
work once we upgraded from JServ to Tomcat.
BrowserMatch never worked for me.
I'll probably try to implement my own URLConnection class
and go from there. Thanks, SUN!
Submitted On 22-JUL-2002
pclemons
You indicate that this defect is closed and fixed. How and
where did you fix it? I'm using JDK 1.4 and it's still a problem.
Submitted On 29-JUL-2002
sammy21
I need this to work with both IIS and Apache. With 1.4.0 all
works great (thanks). With 1.3.1 it works with Apache if I
include the BrowserMatch thing but it doesn't work with IIS.
Please fix 1.3.1 so that it works with IIS too.
1.4 works fine (thanks)
Submitted On 08-AUG-2002
spoerkt
Hi folks! For all people in trouble with this bug according
apache-tomcat communication, try to use ajpv13 instead of
ajpv12! This may help. Regards!
Submitted On 03-JUN-2004
rkippen
I'm using 1.4.2 applet to connect to Servlet running on Tomcat. Calling con.getInputStream() blocks. I've tried two suggestions con.setRequestProperty("TE", "identity") and I've tried to use a separate thread. Both results failed. Does anyone know a work-around or if this is fixed in 1.5?
Submitted On 03-JUN-2004
rkippen
Ignore my last comment. I was forgetting to close the connection on the client side. Doing con.disconnect() seemed to prevent the problem from occurring.
Submitted On 03-JUN-2004
rkippen
I'm using 1.4.2 applet to connect to Servlet running on
Tomcat. Calling con.getInputStream() blocks. I've tried
two suggestions con.setRequestProperty
("TE", "identity") and I've tried to use a separate thread. Both results failed. Does anyone know a work-around or if this is fixed in 1.5?
Submitted On 28-JUN-2004
AurelienGeron
Same problem here. This page says closed,fixed, so where is the fix? In what version of the JDK does it work?
Also, I just wanted to add that calling disconnect on the connection unblocked the getInputStream under Windows XP with the following JDK :
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
Unfortunately, it did not work under linux with JDK 1.4.2_02.
Submitted On 03-JAN-2008
Http/1.1 has persistent connections, if it is true: why all the client-server java applications closes the connection when sends the response of a request???? What can I do to use persistent connections???
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|