java.io.IOException: Premature EOF

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via stackoverflow.com by Unknown author

When you iterate over the lines of a scala.io.Source with source.getLines, make sure you do not close the source until you processed the iterator.

Solutions on the web

java.io.IOException: Premature EOF
at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:565)
at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3066)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at au.com.bytecode.opencsv.CSVReader.getNextLine(CSVReader.java:266)
at au.org.ala.biocache.tool.Sampling.processBatchRemote(Sampling.scala:491)
at au.org.ala.biocache.tool.Sampling.sampling(Sampling.scala:368)
at au.org.ala.biocache.tool.Sampling$.main(Sampling.scala:115)
at au.org.ala.biocache.cmd.CMD2$.main(CMD2.scala:134)
at au.org.ala.biocache.cmd.CMD2.main(CMD2.scala)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
22 times, 9 months ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
20 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.