FULL PRODUCT VERSION :
Java version 1.6.0_29
Java<TM> SE Runtime Environment <build 1.6.0_29-b11>
Java Hotspot<TM> 64-bit Server VM <build 20.4-b02, mixed mode>
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Home edition
EXTRA RELEVANT SYSTEM CONFIGURATION :
Its a java web start application communicating with a servlet to download files. It works perfectly in Windows XP but the same jars in Windows 7 give Premature EOF.
A DESCRIPTION OF THE PROBLEM :
Its a java web start application communicating with a servlet to download files. It works perfectly in Windows XP but the same jars in Windows 7 give Premature EOF. The server is Windows 2003 Server running on Apache 2.2.6 and Tomcat 6.0.28 server The client is running Windows 7 Home Premium version 6.1 build 7600.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Running a Filedownloadservlet to download a number of sub-directories of hi-res graphic files contained in the main directory gives this error after downloading a few files.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expecting the files and subdirectories to download completely to the client machine.
ACTUAL -
After downloading a few subdirectories and files, it gave java.io.exception Premature EOF. Searched the internet and found others having same problem. Tried ignoring EOF by try-catch. kept on trying in a while loop until ran out of heap space and aborted.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.Exception : Premature EOF .
Most of the time it hangs and the photobook client task has to be killed. Once after a long time it showed the exception multiple number of times and then aborted when it ran out of heap space.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
The application is a photobook software which allows user to download themes of Backgrounds, etc , The Filedownloadservlet talks to HTTPFiledownload program to download directories of graphic content.
try
{
// common.log_message( " Entering sendDownloadRequest " );
conn = getHttpConnection(serverurl);
if (conn == null)
status = -1 ;
// This zip output stream will server as our stream to the server and
// will zip each file while it sends it to the server.
final String localdirectory = ((String)downloadparams.get( " LOCALDIRECTORY " ));
downloadMode = ((Integer)downloadparams.get( " DOWNLOADMODE " )).intValue();
ZipOutputStream out = new ZipOutputStream(conn.getOutputStream());
// Serializing the Server Object and adding to the Zipped Output Stream
serverReq = makeServerRequest(out, downloadparams);
// Serializing, creating Zip Entry and adding to Zip O/p Stream
serentry = new ZipEntry( " ServerReq.ser " );
out.setLevel(9);
out.putNextEntry(serentry);
ObjectOutputStream objStream = null;
objStream = new ObjectOutputStream(out);
serverReq.save(objStream);
objStream.flush();
out.closeEntry();
// Once we are done writing out our stream we will finish building the
// archive and close the stream.
out.finish();
out.close();
objStream.close();
// Now that we have set all the connection parameters and prepared all
// the data we are ready to connect to the server.
conn.connect();
common.log_message( " Reading the Response Stream " );
final ZipInputStream in = new ZipInputStream(conn.getInputStream());
try {
ZipEntry entry =null ;
while (true)
{
//try {
entry = in.getNextEntry();
//}catch(IOException e){
//common.log_message( " FileDownload : IO Exception while reading server response " );
//}
if (entry == null) {
common.log_message( " No ZIP Entry. " );
break;
}
status = 1;
common.log_message( " ZIP ENTRY: " + entry.toString());
String fullFileName = entry.getName();
common.log_message( " Reading Response : Fullfilename " + fullFileName);
//common.log_message( " DownloadMode == " + downloadMode);
//if (downloadMode == 0){
//common.log_message( " DownloadMode == 0 " );
if (fullFileName.equals( " backgroundImage " ) || fullFileName.equals( " frame " ) ||
fullFileName.equals( " picframe " ) || fullFileName.equals( " predesigned " )||
fullFileName.equals( " clip " ))
{
currentresdir = fullFileName ;
common.log_message( " CurrentResDir : " + currentresdir);
File localpath = new File(localdirectory);
common.log_message( " localpath : " + localpath);
if (localpath.exists()){
String dirname = localdirectory ;
RmDir(dirname);
dirname = dirname.replace(currentresdir, " Thumb_ " +currentresdir);
RmDir(dirname);
}
//common.log_message( " Deleting code " );
continue ;
}
//}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Searched the Internet. Found a couple of guys who also had the same issue. Someone suggested ignoring the java.io.exception and retrying. That did not work.
We are due to release the software and are stuck. It works perfectly fine on Windows XP client. which we have with java version 1.6.0_17.
Java version 1.6.0_29
Java<TM> SE Runtime Environment <build 1.6.0_29-b11>
Java Hotspot<TM> 64-bit Server VM <build 20.4-b02, mixed mode>
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Home edition
EXTRA RELEVANT SYSTEM CONFIGURATION :
Its a java web start application communicating with a servlet to download files. It works perfectly in Windows XP but the same jars in Windows 7 give Premature EOF.
A DESCRIPTION OF THE PROBLEM :
Its a java web start application communicating with a servlet to download files. It works perfectly in Windows XP but the same jars in Windows 7 give Premature EOF. The server is Windows 2003 Server running on Apache 2.2.6 and Tomcat 6.0.28 server The client is running Windows 7 Home Premium version 6.1 build 7600.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Running a Filedownloadservlet to download a number of sub-directories of hi-res graphic files contained in the main directory gives this error after downloading a few files.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expecting the files and subdirectories to download completely to the client machine.
ACTUAL -
After downloading a few subdirectories and files, it gave java.io.exception Premature EOF. Searched the internet and found others having same problem. Tried ignoring EOF by try-catch. kept on trying in a while loop until ran out of heap space and aborted.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.Exception : Premature EOF .
Most of the time it hangs and the photobook client task has to be killed. Once after a long time it showed the exception multiple number of times and then aborted when it ran out of heap space.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
The application is a photobook software which allows user to download themes of Backgrounds, etc , The Filedownloadservlet talks to HTTPFiledownload program to download directories of graphic content.
try
{
// common.log_message( " Entering sendDownloadRequest " );
conn = getHttpConnection(serverurl);
if (conn == null)
status = -1 ;
// This zip output stream will server as our stream to the server and
// will zip each file while it sends it to the server.
final String localdirectory = ((String)downloadparams.get( " LOCALDIRECTORY " ));
downloadMode = ((Integer)downloadparams.get( " DOWNLOADMODE " )).intValue();
ZipOutputStream out = new ZipOutputStream(conn.getOutputStream());
// Serializing the Server Object and adding to the Zipped Output Stream
serverReq = makeServerRequest(out, downloadparams);
// Serializing, creating Zip Entry and adding to Zip O/p Stream
serentry = new ZipEntry( " ServerReq.ser " );
out.setLevel(9);
out.putNextEntry(serentry);
ObjectOutputStream objStream = null;
objStream = new ObjectOutputStream(out);
serverReq.save(objStream);
objStream.flush();
out.closeEntry();
// Once we are done writing out our stream we will finish building the
// archive and close the stream.
out.finish();
out.close();
objStream.close();
// Now that we have set all the connection parameters and prepared all
// the data we are ready to connect to the server.
conn.connect();
common.log_message( " Reading the Response Stream " );
final ZipInputStream in = new ZipInputStream(conn.getInputStream());
try {
ZipEntry entry =null ;
while (true)
{
//try {
entry = in.getNextEntry();
//}catch(IOException e){
//common.log_message( " FileDownload : IO Exception while reading server response " );
//}
if (entry == null) {
common.log_message( " No ZIP Entry. " );
break;
}
status = 1;
common.log_message( " ZIP ENTRY: " + entry.toString());
String fullFileName = entry.getName();
common.log_message( " Reading Response : Fullfilename " + fullFileName);
//common.log_message( " DownloadMode == " + downloadMode);
//if (downloadMode == 0){
//common.log_message( " DownloadMode == 0 " );
if (fullFileName.equals( " backgroundImage " ) || fullFileName.equals( " frame " ) ||
fullFileName.equals( " picframe " ) || fullFileName.equals( " predesigned " )||
fullFileName.equals( " clip " ))
{
currentresdir = fullFileName ;
common.log_message( " CurrentResDir : " + currentresdir);
File localpath = new File(localdirectory);
common.log_message( " localpath : " + localpath);
if (localpath.exists()){
String dirname = localdirectory ;
RmDir(dirname);
dirname = dirname.replace(currentresdir, " Thumb_ " +currentresdir);
RmDir(dirname);
}
//common.log_message( " Deleting code " );
continue ;
}
//}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Searched the Internet. Found a couple of guys who also had the same issue. Someone suggested ignoring the java.io.exception and retrying. That did not work.
We are due to release the software and are stuck. It works perfectly fine on Windows XP client. which we have with java version 1.6.0_17.