Kingzp / winzipaes

Automatically exported from code.google.com/p/winzipaes
0 stars 0 forks source link

Never returns from zipAndEncrypt call executing in Linux environment #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Inside a WebApp running in a Tomcat Server in a Red Hat Enterprise Linux
Server release 5.4, the thread remains "suspended" permanently after
calling AesZipFileEncrypter.zipAndEncrypt

My code snippet looks like this:

Logger log = Logger.getLogger("TEST");

File tmpDir = new File(System.getProperty("java.io.tmpdir")) ;
File fLocal = new File( tmpDir, "filetocompress.txt" ) ;
final File rutaZip = new File(tmpDir, "encrypted.zip");
log.info("Creating "+rutaZip.getCanonicalPath()) ;

AesZipFileEncrypter azfe = new AesZipFileEncrypter(rutaZip);
azfe.zipAndEncrypt( fLocal, "passw" );
log.info("    added "+fLocal.getCanonicalPath()) ;

So far, the program never reaches the "added.." log trace print.
In disk, I can see the contents of java.io.tmpdir folder as follows:

-rw-r--r-- 1 tomcat tomcat       0 may 27 10:36 encrypted.zip
-rw-r--r-- 1 tomcat tomcat   68608 may 27 10:36 filetocompress.txt
-rw-r--r-- 1 tomcat tomcat   17709 may 27 10:36 filetocompress.txt.zip

So, it seems as if the zipping did worked, but not the following step of
encrypting it and putting it into the encrypted.zip file.

I cannot give more information because it's a remote server and so I can't
make a more accurate debug. I only know that the thread never retuns, but
stays running at some loop along the addEncrypted method.

Regards

Original issue reported on code.google.com by maravill...@gmail.com on 27 May 2010 at 9:39

GoogleCodeExporter commented 9 years ago
Does the problem also occur in a "stand-alone" setup on your local machine (unix
environment)? If so, can you provide "filetocompress.txt" for debugging 
purposes?

Original comment by olaf.merkert on 30 May 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Curiously, in my local machine it executes with no problem. True to say that 
it's a
Windows machine instead :-)

But in the server (Linux) the executions stays running forever, just as 
described before.

"filetocompress.txt" is just a typical text database file of names, addresses, 
etc.
with one alphanumeric line per tuple.

Original comment by maravill...@gmail.com on 7 Jun 2010 at 8:13

GoogleCodeExporter commented 9 years ago
Test code on my Ubuntu 9.10  Machine is working perfectly 

Original comment by haroonob on 2 Jul 2010 at 12:29

GoogleCodeExporter commented 9 years ago
Maybe you want to try the latest TRUNK version from SVN as it contains a new 
"in-memory" approach (courtesy of Jean-Luc Cooke) instead of the tmpZipFile 
that was used before (and is still available, if you need to process huge 
amounts of data).

Original comment by olaf.merkert on 3 Jul 2010 at 6:41

GoogleCodeExporter commented 9 years ago
as there was no answer on the latest solution proposal one and I can't 
reproduce the issue, I'll take the liberty to "ivalidate" it

Original comment by olaf.merkert on 6 Aug 2010 at 9:28