Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.io.IOException: missing CR

843790Oct 1 2007 — edited Oct 9 2007
Have any of you had a top-level error that looks like this?

I am producing this error when doing the following:
java.io.IOException: missing CR

at sun.net.www.http.ChunkedInputStream.processRaw(Unknown Source)

at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source)

at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source)

at sun.net.www.http.ChunkedInputStream.read(Unknown Source)

at java.io.FilterInputStream.read(Unknown Source){code}

at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
I have a feeling this is the useful part of the stack trace, but I can provide the entire trace if requested.

Basically, I'm taking a plain URL and attempting to get file content from said URL, and upload it again using MultiPartFormOutputStream (http://forum.java.sun.com/thread.jspa?threadID=451245&forumID=31). The url listed has all the code listed for this output stream, exactly as I have it in my code. The error I get occurs when the program is reading content from the inputstream (I'm using the writeFile method that takes an inputStream as input, taken directly from the URL where I am grabbing content). I do realize that since I am not providing a file size when uploading files that internally this program will download the entire file to the heap before proceeding to upload, which I am okay with in my scenario, but this still leads me to believe that the error occurs when I'm downloading the file. As an additional note, the instantiation of the inputStream I use is just the following

{code:java}
is = (new URL(Url + "getContent?" + "class=" + CLASS + "&obid=" + OBID)).openStream{code}
();where Url is the base URL and is is my input stream. obid and class are other String parameters.

So my real question is this: what is this "missing CR," and what could cause such an error? If someone could either answer this, or point me in the direction of some useful documentation (as google proved worthless in this case), I would be very appreciative. If anyone looking at this thinks that I need more code provided, I would be happy to submit more code as well.

For the love of all that is good in this world, please let this edit show my post correctly                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2007
Added on Oct 1 2007
9 comments
4,755 views