Zipfile not recognizing source

i have a wierd problem. my very simple app sometimes recognizes a .zip file and sometimes throws an unknown source error. the error seems to occur when the zip file was originally created on a mac-- although stuffit can recognize and open these files without any problem. furthermore, when i open one of these files, then rezip it on my windows box, java recognizes the file.
most of the time this does nothing, correctly. other times, it will not recognize the file. i run this with the file in the same directory, and with the same name, so i'm pretty sure it's not a file not found issue.
here's the code:
import java.util.*;
import java.util.zip.*;
public class tester {
public static void main (String[] args) {
new tester().tester1(args[0]);
public void tester1 (String zipName) {
try{
ZipFile zip = new ZipFile(zipName);
} catch (Exception ex) {
System.out.println(ex);
ex.printStackTrace();
the error:
java.util.zip.ZipException: error in opening zip file
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at tester.tester1(tester.java:16)
at tester.main(tester.java:10)
thank you

Do your files have special characters, like �, �, �, etc?
Have you already seen this bug? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244499

Similar Messages

  • SNP Heuristics not recognizing Source of Supply ( TL or Quota )

    Hello,
    I am running SNP Heurisitics and it is not recognizing transportation lane and just proposing Purchase requisition without a source of supply.
    A simple supply chain looks like this:
    MAT1 at LOCNO1 sourced from VENDOR1.
    Transportation lane VENDOR1 --> LOCNO1.
    Inbound Quota for location Locno1 partnered location being vendor1.
    I have demand of 1000 units and SNP Heurisitics proposes 1000 purchase requisitions ( AG ).
    I run SNP Heurisitics or SNP Optimizer but both solutions do not recognize the source of Supply ( TL  or Inbound ).
    However when I run CTM, CTM recognizes the transportation lane ( source of supply ) and creates a SNP PREQ ( EA).
    Can someone help to see what I am missing. Thank you.
    regards,
    Najam

    Aparna,
    Thanks for the reply. Validity dates are okay and the procurement type is set external procurement ( F ). However, I do not have external procurement relationship. Just using a transportation lane created manually.
    regards,
    Najam

  • Compressor not recognizing source resolution?

    I'm having some problems with Compressor, whenever I import H.264 (1920-1080) to transcode to Apple pro res 422, Compressor only recognize the source as 720-480 I've tried different files but the same result? Any ideas are welcome. Thanks Dylan 

    There's nothing wrong with your QuickTime files. The problem is that Compressor uses a service called Qmaster to do its processing, and the link between the two is quite fragile.
    First of all, go to the Compressor menu at the top of the screen and select Reset Background Processing. If that doesn't work, try this:
    http://www.digitalrebellion.com/compressor_repair.htm

  • When i connect my iphone 5 to my pc using the usb cable, my device is not recognized yet when connected to a power source, it charges normally. What should i do to rectify the problem and read sth about debris being in the usb. How do i remove that?

    When i connect my iphone 5 to my pc using the usb cable, my device is not recognized yet when connected to a power source, it charges normally. What should i do to rectify the problem and read sth about debris being in the usb. How do i remove that?

    iOS: Device not recognised in iTunes
    Windows: http://support.apple.com/kb/TS1538

  • External audio source not recognized

    Hey, just got a mac mini with intel package yesterday at my local Apple dealer. Included keyboard, mouse, monitor and speakers. Everything appears to be working beautifully, except the mini is not recognizing the speakers. All the cords are in the right place, the volume is up, power is on, but it is only using the internal speakers. Does not even list the speakers in the sound utility. Any ideas as to what the problem is? The speakers? The cables? Or the output jack in the mini? Any assistance would be greatly appreciated.
    Mac mini intel core duo   Mac OS X (10.4.6)   1.66 GHz, 80 GB HD

    With the package we purchased, got a set of Elecom speakers, worth about $50. Not familiar with the name, so brought them in hoping they could hook them up to a demo Mac mini to test them. Turned out to be a bad cable. Got a new set and was sure I plugged them into the right jack (the one with the headphone symbol above it), turned them on and all was good. Just a cheap pair of speakers was all. Sorry, dunno if this was helpful. Maybe it's your speakers? Rather than the mini's audio jack.
    Mac mini intel core duo   Mac OS X (10.4.6)   1.66 GHz, 80 GB HD

  • IPod is not recognized by iTunes... Driver folder not in Mobile Device Support?

    I have an iPod Touch 4th Generation. First, my iPod wasn't even recognized in Windows. After following the various Apple articles, I solved this.
    But now, my iPod won't be recognized in iTunes. I've been trying to follow this: http://support.apple.com/kb/TS1538 which has worked so far. But the Apple Mobile Device USB Driver is not listed. I follow along as to what to do to solve this until I reach "
    Use this window to navigate to the following folder:
    C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers.
    Note: If using a 64-bit version of Windows, this folder may be stored in C:\Program Files (x86)\Common Files\Apple\Mobile Device Support\Drivers.
    Double-click the "usbaapl.inf" file which is listed in this folder. (This file will be called "usbaapl64.inf" if you have a 64-bit version of Windows)."
    My Mobile Device Support does not have a folder called "Drivers" and my computer does not have any file listed as "usbaapl.inf" anywhere. I'm guessing that this could be the source of the problem. But I can't fix it unless I know where to find these drivers, and I don't know they are on my computer or how to get them.
    Can anyone help?
    Thank you in advance.

    Hello tgraul,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Best of luck,
    Mario

  • [solved] Digital Camera not recognized in device-manager

    My digital camera "Canon Powershot SX120 is" is not recognized by the devicemanager. I have read Digital Cameras.
    $ groups
    wheel storage users printadmin
    The "camera"-Group isn't needed anymore and this group doesn't exist on my system.
    The Powershot SX 120 has a  MTP/PTP connection mode (as the manual says). But:
    # mtp-detect
    Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6
    Listing raw device(s)
    No raw devices found.
    gphoto succeed:
    $ gphoto2 --auto-detect
    Modell Port
    Canon PowerShot SX120 IS usb:002,019
    A gphoto --summary could be found here
    There is no udev-rule for this camera. If i create one while copying a rule from a similar camera from /etc/udev/rules.d/69-libmtp.rules, and store it into /etc/udev/rules.d/69-canon.rules, the device-manager shows up. My udev-rule:
    # Canon PowerShot SX120AX (PTP/MTP mode)
    ATTR{idVendor}=="04a9", ATTR{idProduct}=="31e0", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    The device-manager shows me only the option to open with a file-manager. Doing so will result in an error:
    The file or folder udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:02.1/usb2/2-8/ do not exist.
    With my udev-rule:
    solid-hardware listen
    Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
    Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
    Listening to add/remove events:
    Device Added:
    udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:02.1/usb2/2-8'
    Without the active udev-rule, "solid-hardware listen" produces nothing, but
    udevadm monitor
    monitor will print the received events for:
    UDEV - the event which udev sends out after rule processing
    KERNEL - the kernel uevent
    KERNEL[5077.662572] add /devices/pci0000:00/0000:00:02.1/usb2/2-8 (usb)
    KERNEL[5077.662655] add /devices/pci0000:00/0000:00:02.1/usb2/2-8/2-8:1.0 (usb)
    UDEV [5077.681178] add /devices/pci0000:00/0000:00:02.1/usb2/2-8 (usb)
    UDEV [5077.693035] add /devices/pci0000:00/0000:00:02.1/usb2/2-8/2-8:1.0 (usb)
    Don't know what to do ... is a udev-rule necessary to bring up the message from device-manger? Or is the Camera not recognized as a mtp-device (the Camera has no such settings)? How could i figure it out?
    With Digikam i could import Fotos, but i would do so with gwenview. I've tried to check it out with gwenview_importer:
    $ gwenview_importer --udi '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:02.1/usb2/2-8'
    QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
    gwenview_importer: Missing required source folder argument.
      (don't care about the different udi, i took this example from a former try) but i don't know, how to find out where the "source folder" is ...
    Last edited by quiqueck (2014-02-26 20:10:25)

    I have solved this by making an extra udev-rule for my camera. See my adventure on forum.kde.org for details

  • IPod is not recognized in ITunes after upgrade to 7.3.1

    Please help. I upgraded ITunes to the 7.3.1 version and now my IPod is not recognized in my ITunes. The USB port is working since my IPod recharged when I plugged it into the computer. I uninstalled & then reinstalled ITunes, but, my IPod is still not recognized by ITunes or my computer. I cannot find it listed in "my computer" files.
    Any suggestions as to what happened? Thanks.
    J.
    Dell   Windows XP  

    Your post solved the same problem for me. Thank you so much! And thanks to JaketheSnake for starting this thread. iTunes used to start up automatically whenever I connected my iPod Touch, but a couple of months ago it quit doing that. I didn't think much of it as I just clicked on iTunes in the dock and opened it and went on my merry way. I just figured something in the last iTunes update changed it's behavior. But lately I noticed that my iPod Touch would be in the source list while it was syncing and then it would sometimes just disappear. I was too lazy to start a thread, I guess, because I just thought someone would tell me to "restore" my iPT and I had gotten used to my little "work arounds". But now it's fixed, thanks to both of you.
    Judie

  • 11.1.2 essbase upgrade not recognizing application files location

    Hi all
    I am upgrading an essbase database (Planning) from 11.1.1.3 to 11.1.2.2,
    I trying to configure 2 essbase servers (original 11.1.1.3 and new 11.1.2) running on 1 physical server using different ports and filesystems
    Following all the steps in the Deployment guide in Preparing Essbase Data for Upgrading,
    I ran all the steps in the Manual file transfer instructions to copy from source machine to target machine.
    I have started the steps in rehosting the essbase applications,
    - Completed enable lookup by cluster name:
    - I completed the server to cluster script on the HSS box (updateEssbaseServer )
    when i went to run EssbaseUpdateEssbaseServer one of the planning databases did not update i got this error
    [Mon May 21 14:03:50 2012]cphypd.sherwin.com///admin/Error(1002097)
    Unable to load database [PlanFcst]
    Error loading application = 1002097, continue...
    looking in the logs i found that it was trying to go to the prior location of the 11.1.1.3 instance and not the new location of the 11.1.2 instance
    Why is it not recognizing the new datafile locations

    I saw this in the guide
    I followed these instructions and specified a different directory when running the staging tool, the script was empty, i do not believe it should be, it should contain mapping info to update essbase.sec, which it did not
    On the Configure Essbase Server page, for Full path to application location (ARBORPATH), specify the location of the existing or replicated Essbase data.
    Note:
    If you replicated data to a new machine, and if you selected Differently-named disk volumes, table spaces, or ARBORPATH on source and target or Consolidated disk volumes or tablespaces on target by exporting data during data replication, you must run a script immediately after configuring Essbase to update the Essbase security file to reflect the disk volumes on the upgraded system. The Essbase Staging Tool provides a script to update the settings in the security file (essbase.sec):
    Start the Essbase Server and EPM System services. Navigate to ARBORPATH/app on the machine that is hosting the upgraded Essbase Server and run the following script using MaxL:
    %ARBORPATH%/bin/startMaxl.bat -u userName editagtsec.msh
    where userName is the Administrator user name to connect to the upgraded Essbase server. The script prompts you to enter the password.
    Note:
    editagtsec.msh could be empty in some scenarios. For example, when you launched the Staging Tool, the Staging Tool reports on existing volumes. If no volumes are listed, editagtsec.msh is empty.

  • IPhone 4 unable to charge and USB not recognized?

    Hi, I've just got my iPhone replaced because the old screen is broken.
    In this new iPhone 4.
    The camera rear, when I take photos, there is a slightly transparent black spot. It annoys me, but I chose to ignore.
    It was fine all morning, till BAM!
    This **** thing came up when I wants to charge my iPhone on my laptop.
    My laptop can't recognize the iPhone. Earlier was fine (when I'm copying photos out), then later when I replug it happens.
    "USB device not recognized. The LAST USB device you connected to this computer MALFUNCTIONED, and Windows does not recognize it"
    This is my first time getting this warning.
    Is there any way to reset the USB port, and redetect the iPhone USB?
    Also, my iPhone can't be charge! I've tried different cables, different power source. None work.
    I assume my cable is not broken because if it is, the my laptop wouldn't detect the USB and that annoying warning won't come up.
    I've have TRIED:
    Soft rest and hard reset on iPhone.
    Restart/Shutdown laptop. Also, deleted Upper Filter from Registry. Removed laptop charger. Unplug all USB.
    Reset all setting on iPhone.
    Clean my iPhone charging port and charger adapter USB.
    My iPhone left 10% of battery, and it's 3AM here. There's obviously no apple store open. There also no Genius Bar in my country.
    And I've observe my battery gone down to 9% and back up to 10%. While I'm typing this, the battery goes up to 11%.
    It's so so so slow. There is no "Charging" sign. Normally, the battery icon on the top right will have a plug sign thingy.
    Now it doesn't show anything except for a red battery but percentage is going up so freaking SLOW!
    *Also, how to update IOS to 6.1.4 (current 6.1.3)? I don't want IOS7.
    Using:
    Windows 8 64-bit
    Fujitsu laptop
    iPhone 4 IOS6
    iTunes 10.7
    Help me, my iPhone is dying. Theres no prob for my old iPhone, geez.

    Just an update:
    I spent many hours last night working on my phone, and after leaving it on my docking station for a few hours, it had enough battery to turn on, though it was only a tiny bit of battery. I quickly plugged it into my PC and was able to load the backup from iTunes from about a month ago, so that it was now my phone again. However, straight away the battery died again, and I left it on the docking station all night, but it never charged. Now it no longer shows the battery sign at all, just a black screen.
    Any help at all would be greatly appreciated, as i was checking out the apple website, and as my phone no longer has warrantly it's going to cost me £125 for a service which ain't cheap!

  • NSTabView - selector not recognized using selectLastTabViewItem and friends

    Hi, I'm new to Xcode, Cocoa, and Objective-C (not new to development though). I am using Xcode 2.4.1 on OS X 10.4.11.
    I've gotten on pretty well doing general stuff with most of the widgets, but I'm hung up trying to do something (commonplace) with tabs. I have a NSTabView with 3 tabs, and want to force one of them to become the active tab.
    After a couple hours of screwing with this, I have created a new Xcode project just to test selectLastTabViewItem on a NSTabView. This is exactly what I do:
    1) In Xcode, create new Cocoa application project.
    2) Add class Controller there
    3) Open the MainMenu.nib
    4) In IB, drop the Controller.h file so it appears with the classes.
    5) Instantiate a Controller class
    6) Drop a NSTabView in the Window
    7) Create an outlet of NSTabView type for Controller
    8) Click and drag from Controller instantiated object to the NSTabView object in the GUI - connect it as an outlet. I've verified this has added properly, and in the list of outlets it picks up the "type" of NSTabView i.e. Under Controller's Connects, I see NSTabView (Tab, View)
    9) Create code for Controller, Overwrite code in Xcode with this. (No more work done in IB)
    10) Back in Xcode, edit the source and make Controller.m read as follows:
    #import "Controller.h"
    @implementation Controller
    // Simplest case is to have this code run when awakeFromNib happens
    // I've also tried it tied to a button click action
    - (void)awakeFromNib
    [tabView selectLastTabViewItem]; // select the Tab View Item called 'View'...
    // I've used the other similar methods, such as the one that selects tab view based on
    // identifier. I get the same error with all of them, this one seems easiest to debug
    // since there's the least involved
    @end
    What I get is:
    [Session started at 2009-08-02 16:00:12 -0400.]
    2009-08-02 16:00:12.955 NSTabViewTest[10808] * -[NSTabView selectLastTabViewItem]: selector not recognized [self = 0x3515f0]
    2009-08-02 16:00:12.956 NSTabViewTest[10808] An uncaught exception was raised
    2009-08-02 16:00:12.956 NSTabViewTest[10808] * -[NSTabView selectLastTabViewItem]: selector not recognized [self = 0x3515f0]
    2009-08-02 16:00:12.956 NSTabViewTest[10808] * Uncaught exception: <NSInvalidArgumentException> * -[NSTabView selectLastTabViewItem]: selector not recognized [self = 0x3515f0]
    I've looked up code online and I don't seem to be doing anything different than examples, although I don't know what their nib's look like.. any help would be wonderful. Thanks!
    Message was edited by: Robert Is Confused, fixing to use code tags

    Hi Robert, and welcome to the Dev Forums!
    selectLastTabViewItem: takes one arg which passes the sender's address to the tabView.
    - (void)awakeFromNib { // this line starts with a -, but apple forum prevents it
    NSLog(@"Controller awakeFromNib");
    [tabView selectLastTabViewItem:self]; // select the Tab View Item called 'View'...
    I think your compiler should have given you a warning: 'NSTabView' may not respond to '-selectLastTabViewItem'. These are easy to miss if you don't have your Build Results window open, since the warning bubble may not show up in the source editor until that window is reselected.
    Btw, there's a yellow alert notice in the 1st slot of the forum topics page with code formatting instructions in the subject line (and a link to lots of other handy formatting tricks). You can see how your post will look by clicking the Preview tab on top of the Reply editor panel. If you reply to my post, click the double-quote icon under Preview to see exactly how my message was formatted.
    - Ray

  • USB Device Not Recognized on Windows 7 - USB mouse

    I have a 4 week old Inspiron 1545 with Windows 7 Home premium that has developed an error: USB errors while trying to install a Microsoft USB mouse on this Laptop.   Interestingly, my Microsoft USB Mouse installed perfectly first time and worked for about 2 weeks, and then failed.   In looking at the system restore points, it tells me that there have been two driver updates to the USB environment since the unit was shipped from Dell.   I wonder if an automatic update from Microsoft has somehow inadvertently updated or replaced a Dell factory driver.
    Two nights ago I spent 45 minutes with Dell tech support doing remote control bug fixing on this laptop.  They werent able to fix it (in the time allowed).  They downloaded at least one of their newest drivers onto this machine and rebooted it - and they seemed pretty savvy - but still not working.  So I went ahead a did a system restore to a point about 10 days back because I could see that a USB driver would be affected (as shown in the system restore menus), and I would like to compliment Microsoft on this very cool functionality!
    At this point, I've unplugged the USB mouse , used the Device Manager to delete the 'unknown device', and done a system restore back to what I suspected was a working point.   But still getting a 'Device not recognized' warning every few minutes, and still don't have a working mouse.  I don't want to have to do system restores back to pprevious dates, although I suspect this is one solution.

    Hello,
    I just wanted to let u know, I had this same issue for about 2 weeks. Basically what happened was a bad install of my AMD Chipset drivers. When I attempted to upgrade, the install didn't go all the way through.
    I then restarted my system, and BAM! No Mouse or Keyboard functionality thru USB.
    Even when I went into SAFE MODE the Mouse and Keyboard were not functional. The only time they worked was when the computer first attempted to start, BEFORE windows loaded.
    So, this means that your issue is a software problem.
    I thought it was some other software that I installed, and ran a restore session, but that wasn't the issue. Still no functionality.
    I even tried removing my CMOS battery, to reset it, since some people said that had solved their problems...Still nothing.
    I then read other forums around the web using my Android phone to try and find a solution, only those solutions were no help.
    I was also advised to run: MSCONFIG and Hide all  Windows programs and then stop every other driver, source from loading (of course if my mouse and kb worked, I would have tried that).
    I had even read that because I was using USB, that I should try using a PS/2 Mouse and Keyboard connection.
    It took me 2 weeks to get the correct PS2 adapter that worked, which would essentially allow me access to my system again...
    I  Purchased a USB A Female to PS2 (MDIN6) Male Adapter (for Mouse) from http://www.SFCable.com
    This my friends, was a lifesaver. I only have one PS2 port on my system, so I used my mouse to try  every option I had previously read about. Of course you cannot type because the keyboard doesn't work, so you need to know the location of the folder where
    the programs you are trying to run are.
    So, a little after I got back into my system, and I closed down all programs, the warning screen came up that ALL of my USB Ports failed and could not be updated. I even  Uninstalled every last USB port from the System Properties and restarted, and still
    that didn't work.
     I had forgotten that during the time when this problem arose, there was a failed install of my AMD chipset drivers, so luckily I had not deleted the source file and I tried to reinstall, and VIOLA! I'm back up and running and my USB ports are restored
    and everything is working!
    I hope this solution is able to help other people out there.
    Thanks,
    JE - [email protected]

  • ITunes Not Recognizing my iPod Touch after Upgrading from Tiger to Leopard

    After upgrading from Tiger (10.4.x) to Leopard (10.5.0=>10.5.6), my iPod Touch is no longer recognized by iTunes 8.0.2. The iPod Touch no longer appears in iTunes' "source list" (left side pane in iTunes' GUI).
    Immediately prior to that upgrade, my iPod Touch was working great with Tiger (10.4.x). iTunes 8.0.2 recognized it (listed it in sources) and always synchronized with it successfully.''
    My iPod Touch is also not shown in the Finder. However, it does show up as recognized in iPhoto.
    Any ideas on how to get the iPod recognized again in iTunes under Leopard?

    Thanks to a posting by Jim in a different Apple Discussions (forum), my problem is now resolved. Read on for the details.
    iPods & Finder. Some other postings incorrectly lead me to believe that the iPod would show up in the "Finder". Jim's posting set me straight on this.
    iTunes Not Recognizing iPod Touch. Prior to Jim's posting, I had already read the article that Jim referenced (to remove and reinstall the Apple Mobile Device Service per article "http://support.apple.com/kb/HT1747").
    Prior to Jim's posting, I had also read other articles in various "Apple Discussions" (forums) that suggested this recognition problem could be resolved by uninstalling/re-installing iTunes 8.0.2. Some implied that you could just re-install iTunes 8.0.2 right over the currently installed one without bothering to uninstall it.
    Based on those postings, I "gambled" last night and simply downloaded and re-installed iTunes 8.0.2 (without uninstalling it first). I noticed during the installation that the Apple Mobile Device agent was also re-installed. Well, my gamble paid off! After the installation (and a reboot?), iTunes onces again RECOGNIZED my iPod Touch.

  • My iPod classic is not recognized by my computer or iTunes

    My iPod is not recognized by my computer or iTunes. It worked fine a few months ago but now it doesn't even sync. I tried everything from turning it on/off, reinstalling iTunes, checking the connectivity issues and etc. After going through the connectivity test the only thing I found odd was that it said that the iPod classic running firmware 1.1.2 is not connected. Could that be the issue? And if so, how can I get that firmware running again?

    I have the same issue with my ipod classic, and have gone through these steps. However, when i come to the step where it says to reinstall: "
    Next, open the new version of iTunes and connect your iPod to your computer.
    Select your iPod in the source list and click "Check for Update" under the Summary tab.   iTunes will check to see if your iPod needs to be updated and perform the update for you. "
    there is no ipod listed in the source list to check for any updates under the summary tab. Itunes just DOES NOT see the ipod at all. And this is where I am stuck....further instructions PLEASE!!! Thank you....

  • IPod is not recognized in windows

    My iPod is not recognized in either Windows 7 or iTunes.  The iPod was jail breaked and that may have an impact.  I did a reset to remove all files and now all I can do with it is view the logo on the screen.  Help.

    Jailbreaking voids the Apple warranty and also means that you will not get any support from Apple, including from this Apple forum. Jailbreaking can't be discussed in this Apple forum.
    Unauthorized modification of iOS has been a major source of instability, disruption of services, and other issues

Maybe you are looking for