ZipInputStream is unable to find a phonebook entry

Before I raise a bug, someone think that it works as expected?

The following unit test:
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;



public class Zisbug {

    public static void main(String[] args) throws IOException {
        File file = new File("src/test/resources/bundle.jar");
        ZipInputStream zis = new ZipInputStream(new FileInputStream(file));
        ZipEntry entry = zis.getNextEntry();
        boolean found = false;
        while (entry != null) {
            String name = entry.getName();
            System.out.println(name);
            if ("META-INF/spring/".equals(name)) {
                found = true;
            }
            entry = zis.getNextEntry();
        }
        if (!found) {
            System.out.println();
            System.out.println("Error: Entry 'META-INF/spring/' not found");
        }

    }

}
When it is run with a JAR that contains two files (META-INF/MANIFEST. MF and META-INF/spring/app-context.xml) believes that three entries:
META-INF/
META-INF/spring/app-context.xml
META-INF/MANIFEST.MF
but is unable to find the entry:
META-INF/spring
This fails on Mac OS X with 1.6.0_33 Java or Java 1.7.0_06 - ea on Windows XP with Java 1.6.0_13 and Ubuntu 12.04 with Java 1.7.0_04.

A zip file that contains the unit test and the JAR file is available here: https://dl.dropbox.com/u/2487064/zisbug.zip. To reproduce the problem, unpack the zip file, change the directory the file unpacked, and the problem:
java -classpath bin Zisbug
The following output shows the issue:
META-INF/
META-INF/spring/app-context.xml
META-INF/MANIFEST.MF

Error: Entry 'META-INF/spring/' not found
Note that tf jar also fails to find the missing entry, which may indicate a problem with the POT or the same question inside the jar program:
$ jar tf bundle.jar 
META-INF/
META-INF/spring/app-context.xml
META-INF/MANIFEST.MF
Recreate the JAR solves the problem, then it seems likely that there was a problem in the original CONTAINER.

I don't think that there must be a problem directly, but more how the zip file was built. You do not find the directory because it does not exist as an entry unique zip (where the META-INF folder for some reason has a); There is only the file which is a zip-entry name that, to the outside world, reveals that it is in a subdirectory.

Tags: Oracle

Similar Questions

  • "Unable to create a phonebook entry.

    I used Lenove laptop. I have used Windows7 Home Premium and Net service Provider connection is Reliance Huawei Mobile broadband.  That's my problem, when I start Internet connection click on 'Connect' get this problem "unable to create a phonebook entry.

    Hello


    To work on the question, see these steps.

    You can check if the following services are running on your computer.

    (a) click Start, type "Services.msc" (without the quotes) in the search box and press enter.
    (b) search for the following services:

    a. telephone
    b. network connections
    c. Remote Access Connection Manager
    d. Remote Access Auto Connection Manager
     
    (c) right click and select Properties.
    (d) under the general tab, next to Startup type, select Automatic followed by OK.
    (e) restart the laptop and try to connect again.
     
    If the problem persists, please contact your Internet service provider connection service.

    Hope the information is useful.
  • Error: Unable to find DLL entry pointProtctionNotify chnge in mbam

    Tried to launch Malware Anti-Malware and get the following message.
    Can not find the DLL entry pointProtctionNotify chnge in mbam
    Does anyone have a solution?

    Original title: program compatibility Application Applications App Apps game games Legacy Crash crashes Hang hangs

    Hello

    1. what operating system is installed on the computer?

    2 have you tried to uninstall and reinstall Malwarebytes?

    I suggest you to uninstall and reinstall Malwarebytes and check the issue.

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    To reinstall Malwarebytes, follow this link:
    www.Malwarebytes.org

    If this does not help, you can post your request in the forums of Malwarebytes.
    forums. Malwarebytes.org

  • Error in Windows Mail - "error 623 - system could not find the directory entry for this connection".

    Original title: Windows Vista, Windows Mail, error 623, unable to connect to the mail.
    This problem occurred after a storm. Modem was fried.  Replaced the modem with the modem "2wire" ATT.

    Now get "error 623: the system could not find the directory entry for this connection"or the sys works very well. " Att think maybe in Vista?  Help, please. Works of g-mail, but I like Windows mail.

    Hello Bbuddes,

    You can watch the following information/tutorial to help with most of the problems of Windows Mail.
    http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.html

    There is a section to reset Windows Mail which can help with your problem.

    Sincerely,.

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • BlackBerry Smartphones unable to find addresses

    I am unable to find the addresses I sync to my blackberry from outlook. I click on my address book and there is no listed address. When I check the properties it tells me I have 121 entries. I try to use the find command and does not pull up all the names.

    Greg... Open your address book > press the Menu key (to the left of the trackball) > click on filters > uncheck all filters and save them.

    Watcha see?

  • javax.security.auth.login.LoginException: unable to find LoginModule class

    Hi experts,

    Reconciliation RACF agent could not connect to the IOM is error: unable to find LoginModule class: weblogic.security.auth.login.UsernamePasswordLoginModule

    I created using WebLogic JarBuilder wlfullclient.jar tool and copied on IOM Java tasks and scheduled tasks also copied to OIM_Server/ext.


    FINE: Error reconcile IdfResource user... utest02
    February 29, 2012 23:37:13 RacfAgentReconImpl update (String)
    MORE FINE: RETURN
    March 1, 2012 12:15:43 AM IdfAgentReconImpl init()
    MORE FINE: ENTRY
    Error of com.thortech.xl.racf.recon.util.RacfAgentLogger March 1, 2012 12:15:43
    SEVERE: error, try to connect to the IOM... Thor.API.Exceptions.tcAPIException: javax.security.auth.login.LoginException: unable to find LoginModule class: weblogic.security.auth.login.UsernamePasswordLoginModule*.
    March 1, 2012 12:15:43 AM RacfAgentXLFactory init()
    MORE FINE: RETURN
    March 1, 2012 12:15:43 AM IdfAgentReconImpl init()
    MORE FINE: RETURN
    March 1, 2012 12:15:43 AM fine com.thortech.xl.racf.recon.util.RacfAgentLogger
    FINE: Startup recon process of erasure for resource [RETS RACF on Cluster RV lot] and [utest01]
    Error of com.thortech.xl.racf.recon.util.RacfAgentLogger March 1, 2012 12:15:43
    SEVERE: Error deleting the user [utest01]... java.lang.NullPointerException

    wlfullclient.jar must be in the classpath in $WL_HOME/server/lib

    build wlfullclient.jar

    CD $MW_HOME/wlserver_10.3/server/lib
    $MW_HOME/jdk160_18/bin/java - jar $MW_HOME/modules/com.bea.core.jarbuilder_1.5.0.0.jar

    Note: Change the appropriate version of com.bea.core.jarbuilder_>

    Published by: Hardew on June 14, 2012 10:54

  • Error message - unable to find the proxy server - how can I solve this problem

    When I try to enter some sites I get the error message: unable to find the proxy server, Firefox is configured to use a proxy server that is not found. It happened all of a sudden and I don't know why or how I can fix it, it does not help that most help site are blocked. I'm using a Mac 10.5.8 and Firefox 15.

    Set not to use any proxy.

    Firefox> Preferences > Advanced > network > setting > don't score no proxy

  • Unable to find the file userChrome.css customization of Firefox. I just installed 20.0.1 firefox browser. You want to disable/remove the navigation bar. Pls Hlp

    Unable to find the file userChrome.css customization of Firefox. I just installed 20.0.1 version of the Firefox browser.
    I want to disable/remove the navigation bar of the browser window, making the browser works like the kiosk mode.

    Help, please

    Thank you
    Vishal.

    your profile folder is a subfolder of C:\Documents and Settings\XXXXXXX\Application Data\Mozilla\Firefox\Profiles\ and something like < randomstring > .default label - folder chrome with the userChrome.css file must go in this folder .default < randomstring > .

  • Lost icon of report of trusteer, unable to find an answer on the Web site here.

    I've just updated to Version 6 of Firefox, I lost the Trusteer report icon located on the tool bar, the same thing happened when I downloaded Version 5, I was hoping that my information was still available in my messages Inbox when I logged in Mozilla, but unfortunately he went, I searched the Web Trusteer site and I am unable to find anything.

    Trusteer Support technical report - https://support.mozilla.com/en-US/questions/862201

    We are pleased to inform you that a version of the report that supports Firefox 6 has been released and is now available for download in the following link:

    If the report indicates that the version of the report that you are trying to install is older than the version already installed, please follow these instructions:

    Check and tell if its working.

  • Satellite Pro L20 - I need a new screen and I am unable to find a part number

    Hi all

    My L20 Pro Satt needs a new screen and I am unable to find a screen with number of part corresponding to mine.

    Can anyone provide me with the other part numbers that would fit mine.

    Thank you

    I found only a display for a Satellite L25 Pro but I guess that the two devices are very similar and use the same part of the screen.
    The display part number is K000000620 and it s a 15 XGA 1024 x 768 display.
    http://www.screentekinc.com/Toshiba_Satellite_Pro_L25--15-inch--1024x768-XGA-laptop-LCD-screen.shtml

    You also can order the compatible display. You can contact the partner of service allowed in your country to order this part.
    But be aware that the display is one of the most expensive parts of laptop.

  • Installed Windows 7 on my HP Compaq nw8440 but unable to find the drivers that only Vista drivers are ther

    I just install Window 7 Home Basic Edition as final Version was my HP Compaq nw8440 too slow. After installation, I am unable to find the drivers and all drivers available for Windows Vista. No driver VGA, No Finger Print etc. And the Internet is also working slowly well my connection giving the same speed. Please help me

    You are the very welcome.

    I do not take up that simple...

    Try the driver windows 7 for her at the link below and you will need the W7 software protect tools because I do not think the Vista software works.  Ditto for the quick launch buttons.

    These drivers have been extracted from the 6910p who was the first series HP business notebook, support for windows 7 and the one that follows in the line after the nc6400 (the 14.1 "model of your screen).

    http://h20000.www2.HP.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&swItem=ob-66699-1&prodTypeId=321957&prodSeriesId=1839152

    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=321957&prodSeriesId=3357377&prodNameId=3357378&swEnvOID=4053&swLang=13&taskId=135&swItem=ob-78740-1&mode=3

    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=321957&prodSeriesId=3357377&prodNameId=3357378&swEnvOID=4053&swLang=13&mode=2&taskId=135&swItem=ob-77198-1

    Paul

  • Why is-Visa Interactive Control unable to find or load the visa library

    I'm using LabVIEW 8.5.1.  I recently installed driver VISA tektronix to connect with one of their products.  That has proved to be a bad idea.  I've uninstalled it one then installed VISA460, but when I try to write a labVIEW driver that communicates via RS232 or USB, I get this error:

    LabVIEW: (Hex 0xBFFF009E) VISA or a library of code required by VISA impossible situated loaded.  This is usually due to a required driver is not installed on the system.
    =========================
    VISA: (Hex 0xBFFF009E) a code library required by VISA impossible located or loaded.

    When you try to run an interactive control Visa I get an error saying unable to find or load the visa library.  Is there anything else I need to download?  Any help would be great. Thank you.

    I had already done this, but had no luck.  However, I could be back up and running using Msiblast.  This is a great little program.  So, if anyone has problems in the future, simply download Msiblast and delete everything has VISA inside and then run the Setup program OR Visa.  Thanks for the help.

  • Get error saying: a necessary file to your aol desktop software work properly (snmaster.idx) unable to find to fix this problem.

    Original title: installing the aol software

    I uninstalled some older versions of AOL, now I can not open aol. Get error saying: a necessary file to your aol desktop software work properly (snmaster.idx) unable to find to fix this problem. Please reinstall the desktop aol PFC snmaster.idx problem is I don't know how to install this software!  Help

    Hi Bruce,.

    Thanks for posting your question in the Microsoft Community Forum.

    Based on the information, you receive the error message error message to reinstall the AOL software to fix file snmaster.idx missing after uninstalling older versions of AOL.

    This problem may occur if some data for AOL Desktop Software files are not installed in the correct location.

    You can see the AOL support article to install the AOL desktop software.

    Install AOL Desktop software

    You can also consult the support AOL article and check if it helps.

    Message: SNMaster.idx is missing

    If the problem persists, you can get in touch with the support of AOL for further assistance.

    Hope the helps of information.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • I have removed Java 7, now I get "unable to find a version of the runtime to run this application.

    I have removed Java 7, now I get "unable to find a version of the runtime to run this application.

    Well Yes, if the application requires Java to run, you have to reinstall Java to get the app runs.

  • Internet is unable to find a certificate to log...

    Unable to connect to my wireless network. See the message: «...» "Unable to find a certificate to log". I tried to pass by & IEEE activation, but that the screen allow me to click on anything whatsoever. I tried to remove my wireless network & reconnect, but I still get the same message. Any suggestions?

    Hi MeganFrost,

    ·         You did it of any material changes or software on the computer before this problem?

    ·         What is the brand and model of the network adapter?

    You can follow this link and check if it helps.

    In the Windows wireless network connection problems

    Hope the helps of information.

    Please post back and we do know.

Maybe you are looking for