• Post Reply Bookmark Topic Watch Topic
  • New Topic

uncompress .tar.gz throwing java.io.IOException: No such file or directory at java.io.UnixFileSyste

 
tvk vinod kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using apache commons to uncompress a .tar.gz file, while uncompress it might be keeping that in a temp folder. That folder code could not recognize and hence throwing below exception i believe.
Please help in resolving this. Not sure where tar is uncompressed(i mean location of temp folder).


Source .tar.gz available in this location : /sample/FSM_Bkup/fsm_src_backup/Bkup.20150119024754.tar.gz

Logs :

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at com.sample.recondoc.util.UnTarUtil.uncompressTarGZ(UnTarUtil.java:49)
at com.sample.recondoc.util.ZipUtility.readTarFile(ZipUtility.java:144)
at com.sample.recondoc.service.ExtractUtilService.copyFsmFiles(ExtractUtilService.java:280)
at com.sample.recondoc.main.ExtractorMain.fsmFilesCopy(ExtractorMain.java:47)
at com.sample.recondoc.main.ExtractorMain.main(ExtractorMain.java:31)
Log : ------------Start uncompressTarGZ::tarFile::/sample/FSM_Bkup/fsm_src_backup/Bkup.20150119024754.tar.gz,
strGzFileName::Bkup.20150119024754.tar.gz,
dest::/sample/AuditHelperUtility_RDClassic/Destination/Source_Files/UnZipped
Log : UnTarUtil [main] Before while loop**********
2015-01-19 05:13:16,388 FATAL c.r.r.u.UnTarUtil [main] Exception Occured ::No such file or directory
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at com.sample.recondoc.util.UnTarUtil.uncompressTarGZ(UnTarUtil.java:54)
at com.sample.recondoc.util.ZipUtility.readTarFile(ZipUtility.java:145)
at com.sample.recondoc.service.ExtractUtilService.copyFsmFiles(ExtractUtilService.java:280)
at com.sample.recondoc.main.ExtractorMain.fsmFilesCopy(ExtractorMain.java:47)
at com.sample.recondoc.main.ExtractorMain.main(ExtractorMain.java:31)

===================================
Code throwing below exception :
==================================
//below code takes the .tar.gz file and tries to uncompress the file using apache commons api
FileInputStream fileObj = new FileInputStream(tarFile);
BufferedInputStream buffObj = new BufferedInputStream(fileObj);
GzipCompressorInputStream obj = new GzipCompressorInputStream(buffObj);
tarIn = new TarArchiveInputStream(obj);
TarArchiveEntry tarEntry = tarIn.getNextTarEntry();
 
Dave Tolls
Ranch Hand
Posts: 2270
23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure that stack trace matches anything in that bit of code you've supplied.

Is this your code?
at com.sample.recondoc.util.UnTarUtil.uncompressTarGZ(UnTarUtil.java:54)

If so, which line is that?
I would expect that line to contain a call to createNewFile.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!