Unzip issue

Hi,
The code is as follows
public class TestUnzip {
     final static int BUFFER = 2048;
     public static void unzip(String zipFile) {
          try {
     BufferedOutputStream dest = null;
     BufferedInputStream is = null;
     ZipEntry entry;
     ZipFile zipfile = new ZipFile(zipFile);
     Enumeration e = zipfile.entries();
     while(e.hasMoreElements()) {
     entry = (ZipEntry) e.nextElement();
     System.out.println("Extracting: " +entry);
     is = new BufferedInputStream
     (zipfile.getInputStream(entry));
     int count;
     byte data[] = new byte[BUFFER];
     FileOutputStream fos = new
     FileOutputStream(entry.getName()); Exception occured here
     dest = new
     BufferedOutputStream(fos, BUFFER);
     while ((count = is.read(data, 0, BUFFER))
     != -1) {
     dest.write(data, 0, count);
     dest.flush();
     dest.close();
     is.close();
     } catch(Exception e) {
     e.printStackTrace();
The exception Stack Trace
Extracting: js/partner_s.js
java.io.FileNotFoundException: js\partner_s.js (The system cannot find the path specified)
     at java.io.FileOutputStream.open(Native Method)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
     at TestUnzip.unzip(TestUnzip.java:32)
     at Test.main(Test.java:21)
If we have a close look . it is extracting js/partner_s.js and creating an outputstream for js\partner_s.js . how do i handle this escape sequence issue
please help
Cheers
n4v33n
Edited by: n4v33n on Dec 8, 2008 7:53 AM

Thanks a lot for the suggestion bro. that took me a step further,
To end up with this
Extracting: js/partner_s.js
Extracting: js/
java.io.FileNotFoundException: C:\Documents and Settings\naveenm\Desktop\DumMaaroDum\js (Access is denied)
     at java.io.FileOutputStream.open(Native Method)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
     at TestUnzip.unzip(TestUnzip.java:34)
     at Test.main(Test.java:22)
The folder js and the file were written and this exception was thrown.
Cheers
n4v33n

Similar Messages

  • Unzip issue: Could not delete the zip file after unzip it

    I have issue with the following code, the purpose is to unzip first then delete the zip file. But I could not delete the zip file. When I put a break point before my delete() call, I manually delete it and get the file is used by another process. Please help. Here is my code;
    try{
    File primeZip = new File(dir, fileName);
    ZipInputStream zipStream = new ZipInputStream(new FileInputStream(primeZip));
         ZipFile zf = new ZipFile(primeZip);
         OutputStream out = null;
         for (Enumeration em = zf.entries(); em.hasMoreElements();){
              String fileName = em.nextElement().toString();
              out = new FileOutputStream(fileName );
              byte[] buf = new byte[16384];
              int len;
              while ((len = zipStream.read(buf)) > 0) {
                   out.write(buf, 0, len);
              out.flush();
              out.close();
         out.flush();
                   out.close();
                   zipStream.close();
    primeZip.delete();
    }catch(FileNotFoundException e){          
    }catch(IOException e){         
    }

    I put close() for ZipFile object which is zf.close() befoer I delete the zip file resolve this issue.
    Thanks.

  • 11.5.7 on windows 2000 - unzip issue

    Oracle EBS R11.5.7/8.1.7.4.1 running on windows 2000
    executed the envshell.cmd and while extracting the patch form the new windows encountering the below issue.
    D:\Patch>unzip p4445697_11i_WINNT.zip
    'unzip' is not recognized as an internal or external command,operable program or batch file.
    We can extract using the GUI, select the patch and right click Winzip and extract
    Why we are not able to extract from command prompt?
    Any help would be greately appreciated.

    Hello,
    Make sure to add the directory that has the unzip.exe to the system path:
    From Desktop right-click on My Computer and on Properties
    Select Advanced System Settings on the left
    Click on the Environment Variables button
    Regards, Carlo den Otter.

  • OEM 12c installer unzip issue for disk3

    Hi All ,
    After downloading disk3 for OEM 12c installation for 32 bit Linux ,I am not able to unzip the installer .
    I have tried download's from edelivery and oracle.com but too no luck.
    I have tried extracting this zip on windows it shows as corrupted .Did anyone face this issue OR can any one point me to correct download’s.
    Any help will be highly appreciated .
    Thanks
    Amark

    Hi,
    I am assuming ur are trying to download 12.1.0.2 EM on linux and this can be done from OTN- http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html
    What error are you getting when you use unzip ? Also make sure that you use unzip6 version.
    I hope you are not trying to extract linux binaries on windows host ?
    After downloading binaries from OTN, pls verify the checksum/bytes of the zips as mentioned on the OTN

  • DB 11g unzip fails

    Hi,
    I downloaded DB 11g (win32_11gR1_database.zip) from the Oracle download page and now the unzipping fails. I get "invalid format" error both with PowerArchiver and WinRAR. I downloaded three times, always the same issue.
    I saw some other posts with unzipping issues but nothing corresponded to this problem.
    Am I doing sth. wrong or is that zip-File damaged?
    Thanks for any suggestions or ideas,
    Roger

    Hello,
    Thanks for your help. I found out that our VirusScan at the end of the download process unzips and scans the whole archive. And it has an upper limit of 4 GB. So when a 1.8 GB ZIP-File unzips, it most probably hits that 4 GB limit and the whole rest get simply cut off.
    Considering that these archives are getting bigger and bigger it would be well worth a thought to split up such huge archives into two, or to provide a download option via ftp.
    I'm sure I'm not the only one facing these restrictions.
    Greetings,
    Roger

  • Java web application will not run on iMac.

    I have a problem that has defied technical support in 2 organisations.
    I am a stock trader and use a high spec iMac for my trading platforms. Recently I tried to run two different trading platforms on my Mac without success. The applications are Thinkorswim from TD Ameritrade and Trader Workstation from Interactive Brokers. I can download the Mac versions of either the web based or standalone versions of these apps and install them ok but when I double click the apps I get a "bouncing" logo appear in the dock and then it disappears. These are Java based applications. I have checked that Java is enabled, latest version etc and that Java web start is in place - but to no avail.
    Now the weird part, I also have a Macbook Pro and the apps load OK on this.
    Both machines run latest version of Lion, and all parameters and settings for browser, Java, preferences are identical. I cannot find a difference between the two machines.
    Can anyone suggest a possible cause and solution? Greatly appreciated.
    Des Cahill
    Kildare
    Ireland.

    I had the same - was a un unzipping issue...
    If you have a 3rd party zipper - either uninstall or turn off the zip file handing under prefs
    only use the built in Lion unzipper.
    https://discussions.apple.com/thread/3826648?start=0&tstart=0

  • Ditto Using A Lot Of CPU?  Fans Run Often

    It seems to be the culprit in causing the fans to run fast since installing SL. I stop the process from the Activity Monitor but it starts back. AM shows ditto at 90% when it's running. The fans come on, I stop ditto and they slow down, later the fans come on again, I check and ditto is running again and at 90%...............

    Actually resolved this. Related to unzip issue.
    Attempting to unzip some files locks up the Archive Utility. Force Quitting the Archive Utility leaves ditto open and using a lot of CPU.
    Therefore, I'm using The Unarchiver (as kindly suggested by someone on my unzip problem post) at least until Apple updates the Archive Utility.

  • Unable to unpack disk 2 for SLES8

    I was able to following the links and download Disk 1 and Disk 2 of the Oracle on Linux eval. However, when I try to unzip disk2 of the SLES8 package, I get the following error:
    "Some data in your Zip file is damaged. The CRC is 33d565d2 but should be ff6fbbfd".
    Is there another location where I can download a working version of the zip file.

    please provide exact filesizes when you report such installation/unzip issues, also, you can compare the md5sum with the one posted on the website.
    compare size and md5sum.
    for md5sum on windows you can use: http://www.md5summer.com/
    on linux just type md5sum <filename>
    99.99% it's the download, based on the size/md5sum you'll know which zip you'll need to re-download.
    enjoy.

  • Error indexing KM document

    Greeting All,
    I want to index a file  that I created in the KM in portal server. This is an excel file and size is 500Kb. However i am getting failed index :
    errored :  " Preparation Failed"
    "Filter: The file is password protected or encrypted",
    It is not size issue; some of the other indexed files are smaller and some are bigger than the errored file.
    it is not permission issue, because some of the indexed files are password protected
    Howeve, if i zip the file and upload it, indexing is sucessfull.
    But i do not want to zip the file as many of our users may face unzip issues.any help, or suggestion on how to fix these errors files.
    Thanks
    Pris

    Hi Pris,
    Apply [SAP Note 1543821 TREX : Filter Errors When preprocessing files|https://service.sap.com/sap/support/notes/1543821].
    Best regards,
    Alexander Zhukau

  • Lccs.rb for Ruby 1.9.2

    The old version of the LCCS library files for Ruby (lccs.rb) was not working in Ruby 1.9.2 because of a change in how switch statements are handled. The original files were written for Ruby 1.8.7, and I have verified they work in that environment, but as I was deploying to Heroku, I wanted to have Rails 3 on the Cedar stack, which required that I also use Ruby 1.9.2.
    For anyone interested, I have uploaded the fix to a public GitHub repository:
    https://github.com/startupsatillinois/lccs_ruby

    Just a quick sidenote on this -
    We discovered that the SDK navigator has a bug wherein it fails to
    completely unzip the SDK payload. Turns out, it misses 3 files, one of which
    is LCCS.rb. So, if you need this file, head on over to the developer portal,
    click the "Download the SDK" button, and download the ZIP payload. It's got
    the file you need.
    For the record, we did fix this unzip issue, but it made it in too late for
    last week's release. It'll show up next time around.
      cheers,
       nigel

  • Zip file exxtracting error of these two zip files

    Hi
    i download both zip files. when i click on these zip files, i receive a messeage that "NO ZIP FILE, BAD ZIP FILE OR PART OF A SPANNED/SPLIT ZIP FILE". When i try to extract it again show me error . Please guide me. when i download it , it download very smothly.
    Thanks
    Atiq

    please provide exact filesizes when you report such installation/unzip issues, also, you can compare the md5sum with the one posted on the website.
    sizes / name / md5sum:
    2055432139 RHEL3-DVD1-Oracle-v1.4.zip c571eec50edfd8c032e86cfacc7976cc
    812339260 RHEL3-DVD2-Linux-v1.4.zip 756444bc87871ed52eee9baeb1880390
    for md5sum on windows you can use: http://www.md5summer.com/
    on linux just type md5sum <filename>
    99.99% it's the download, based on the size/md5sum you'll know which zip you'll need to redownload.
    enjoy.

  • Error installing 11gR2 on windows 8

    I downloaded oracle database 11gR2 software for windows X64 platform from OTN.  it contains two distinct zip files(file1 and file2).  the first file extracted but couldn't do the same for the second file. It keeps telling me zip file is empty. I decided to go along and install but after 40% (copying file), I got an error saying the file path was not found
    ' File not found C:\app\Chike\product\11.2.0\dbhome_2\owb\external\oc4j_applications\applications\WFMGRApp'
    pls I need possible solutions to solve this.
    thanks Guys

    First, Win 8 is not a certified OS to install 11gR2 - Oracle Database Preinstallation Requirements
    Which version of Win 8 ? If you have Pro or Enterprise, you will have to install 12c - Oracle Database Preinstallation Tasks
    Home versions of Windows are not certified for any Oracle installs.
    You will need to download both zip files, then unzip both into a single directory before running setup.exe. Your unzip issue indicates that the second zip file is corrupted.
    HTH
    Srini

  • Issue with Unzip in V2 with templates

    HI All,
    I have been using the unzip functionality successfully in my V2 environment but I have an issue. Is it possible to unzip the files which then create the page hierarchy but force then to use a specific page group template.
    At present when I unzip my file, the pages are created but they use a default page layout and I want them to use my page template.
    Any ideas?
    Thanks
    Joel.

    HI All,
    I have been using the unzip functionality successfully in my V2 environment but I have an issue. Is it possible to unzip the files which then create the page hierarchy but force then to use a specific page group template.
    At present when I unzip my file, the pages are created but they use a default page layout and I want them to use my page template.
    Any ideas?
    Thanks
    Joel. I too would be interested to have this kind of feature working in Portal 902

  • Unzip and +w permission issues

    Dear Experts,
    I'm trying to unzip one of Oracle's EBusiness suite files.
    I kept getting issues like:
    unzip B24483-01.zip
    checkdir error: cannot create doc/upgrade.1012
    unable to process doc/upgrade.1012/upgrade/toc.htm.
    checkdir error: cannot create doc/upgrade.1012
    unable to process doc/upgrade.1012/upgrade/trouble_upgrade.htm.
    This directory had been previously unzipped.
    It turned out that the parent directory didn't have write permissions.
    ls -l /appsinstall/StageR12
    dr-xr-xr-x 3 oracleapps dba 4096 Aug 13 2008 doc
    So during unzip, the directory was created, but nothing could be
    written to the directory!
    I changed the permissions, and a subsequent unzip worked.
    chmod +w  ` find . -type d |cut  -d / -f2 | uniq  `
    But if that wasn't enough, there were new directories
    inside the zip file. And they too, were zipped up
    without the correct (+w) permissions!
    This became an iterative process to fix.
    Try to unzip.
    Observe writing to the directories fail.
    Change the permissions on these new directories.
    Repeat, selecting N for overwrite None.
    Lots of wasted time.
    I don't want to do the unzipping as root.
    Is there a flag to use with unzip to deal with this issue?
    Force directories to be created, but not overwrite anything?
    Or, change the permissions on the directories to +w as they are created?
    Thanks a lot!

    I was the first person posting (I think) on this right after the security update 2008-2. I've watched the boards and the answer is "nada." I think apple isn't too interested in poor old Tiger. And if that isn't bad enough, if you have any leopard machines...good luck. So far I can't get them to log in to IMAP or POP under 10.4.11 mail. Only way to get it to work? Kill off Kerberos. Sad but true.

  • Error 2 - No such file or directory issue with unzipping file

    Hi all,
    I know ther's been a couple of threads about this already and I can promise you that I have tried it all.
    Keep getting Error 2 - No such file or directory
    I've downloaded various different software and tried unzipping, tried through Terminal, all of it.
    Still, 3 out of 16 files that I downloaded from the same source appear to be corrupted.
    Please let me know if anyone of you had this problem and how you solved it?
    Thanks a lot

    I'm at a loss as to why the files are numbered like that - unless, perhaps, they were zipped by StuffIt Deluxe and segmented? If you try opening the first, unnumbered, archive, do you get the same error message? Maybe ask if StuffIt Deluxe was used - http://www.stuffit.com/mac-deluxe.html. It's pretty expensive for what it does but I can only think, at this point, that the files were zipped and segmented using something.
    Clinton

Maybe you are looking for

  • Create pdf from html, how to adjust page size

    I have a large html file that I need to convert to a pdf. I am able to open the html in acrobat and save as pdf, but I cannot find where to adjust the page size. When I save the html in acrobat, the saved file is still a single page, but when I open

  • Scheduling automatic message delivery in Mail - help please.

    Hi there. I just have a quick question - how do you set up Mail to automatically send someone a message at a specific time? For instance - email "[email protected]" at 8AM. Is it something that you need to create an AppleScript for - or is this somet

  • Playing video clip file created by Nokia 6233 usin...

    When i am playing video clip file created by Nokia 6233 using Nokea Multimedia Player, I receive a message (the file Formating is not supported), I can't veiw the vedio on the Computer. Please tell me how to solve this problem.

  • I have upgraded to X.7.2 and my printer MP620 has disappeared

    I tried to re-install it from the installation CD but it says the driver is incompatible with current operating system. How can I re-install my Canon MP620 so that I can start printing again - either wirelessly or via USB? When I plug in the printer

  • Getting a set type data to CRMD_ORDER

    Hi Experts,   I have created a new settype which has 2 attributes .I need to show these attributes in Sales Order Line Item level. I know there is a BADI CRM_CUSTOMER_I_BADI which gives me the freedom to show my own screen in the sales order screen(a