Community
Participate
Working Groups
Build F2 Note: I can't reproduce after restarting the workspace but before closing I got it every time when I 1. opened Java search dialog 2. entered the name of a folder inside a resource project 3. search for package declarations ==> A dialog reports an IOException .log: !ENTRY org.eclipse.jdt.ui 4 1 Jun 05, 2002 11:19:57.15 !MESSAGE Internal Error !STACK 1 org.eclipse.jdt.core.JavaModelException[-1]: java.util.zip.ZipException: Invalid zip file Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/util/zip/ZipException.<init>(Ljava/lang/String;)V java/util/zip/ZipFile.openZipImpl([B)V java/util/zip/ZipFile.<init>(Ljava/lang/String;)V org/eclipse/jdt/internal/core/JavaModelManager.getZipFile(Lorg/eclipse/core/runtime/IPath;)Ljava/util/zip/ZipFile; org/eclipse/jdt/internal/core/JarPackageFragmentRoot.getJar()Ljava/util/zip/ZipFile; org/eclipse/jdt/internal/core/JarPackageFragmentRoot.computeJarChildren(Lorg/eclipse/jdt/internal/core/JarPackageFragmentRootInfo;Ljava/util/ArrayList;)V org/eclipse/jdt/internal/core/JarPackageFragmentRoot.computeChildren(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;)Z org/eclipse/jdt/internal/core/PackageFragmentRoot.generateInfos(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;Lorg/eclipse/core/runtime/IProgressMonitor;Ljava/util/Map;Lorg/eclipse/core/resources/IResource;)Z org/eclipse/jdt/internal/core/Openable.buildStructure(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/Openable.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/PackageFragmentRoot.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/JarPackageFragmentRoot.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/JavaElement.openHierarchy()V org/eclipse/jdt/internal/core/JavaElement.getElementInfo()Lorg/eclipse/jdt/internal/core/JavaElementInfo; org/eclipse/jdt/internal/core/JavaElement.getChildren()[Lorg/eclipse/jdt/core/IJavaElement; org/eclipse/jdt/internal/core/search/matching/MatchLocator.locatePackageDeclarations(Lorg/eclipse/jdt/internal/core/search/matching/SearchPattern;Lorg/eclipse/core/resources/IWorkspace;)V org/eclipse/jdt/internal/core/search/matching/MatchLocator.locatePackageDeclarations(Lorg/eclipse/core/resources/IWorkspace;)V org/eclipse/jdt/core/search/SearchEngine.search(Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/search/ISearchPattern;Lorg/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search/IJavaSearchResultCollector;)V org/eclipse/jdt/core/search/SearchEngine.search(Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/IJavaElement;ILorg/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search/IJavaSearchResultCollector;)V org/eclipse/jdt/internal/ui/search/JavaSearchOperation.execute(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation$1.run(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/core/internal/resources/Workspace.run(Lorg/eclipse/core/resources/IWorkspaceRunnable;Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation.run(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jface/operation/ModalContext$ModalContextThread.run()V !ENTRY org.eclipse.jdt.core 4 -1 Jun 05, 2002 11:19:57.15 !MESSAGE I/O exception. !STACK 0 java.util.zip.ZipException: Invalid zip file Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/util/zip/ZipException.<init>(Ljava/lang/String;)V java/util/zip/ZipFile.openZipImpl([B)V java/util/zip/ZipFile.<init>(Ljava/lang/String;)V org/eclipse/jdt/internal/core/JavaModelManager.getZipFile(Lorg/eclipse/core/runtime/IPath;)Ljava/util/zip/ZipFile; org/eclipse/jdt/internal/core/JarPackageFragmentRoot.getJar()Ljava/util/zip/ZipFile; org/eclipse/jdt/internal/core/JarPackageFragmentRoot.computeJarChildren(Lorg/eclipse/jdt/internal/core/JarPackageFragmentRootInfo;Ljava/util/ArrayList;)V org/eclipse/jdt/internal/core/JarPackageFragmentRoot.computeChildren(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;)Z org/eclipse/jdt/internal/core/PackageFragmentRoot.generateInfos(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;Lorg/eclipse/core/runtime/IProgressMonitor;Ljava/util/Map;Lorg/eclipse/core/resources/IResource;)Z org/eclipse/jdt/internal/core/Openable.buildStructure(Lorg/eclipse/jdt/internal/core/OpenableElementInfo;Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/Openable.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/PackageFragmentRoot.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/JarPackageFragmentRoot.openWhenClosed(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jdt/internal/core/JavaElement.openHierarchy()V org/eclipse/jdt/internal/core/JavaElement.getElementInfo()Lorg/eclipse/jdt/internal/core/JavaElementInfo; org/eclipse/jdt/internal/core/JavaElement.getChildren()[Lorg/eclipse/jdt/core/IJavaElement; org/eclipse/jdt/internal/core/search/matching/MatchLocator.locatePackageDeclarations(Lorg/eclipse/jdt/internal/core/search/matching/SearchPattern;Lorg/eclipse/core/resources/IWorkspace;)V org/eclipse/jdt/internal/core/search/matching/MatchLocator.locatePackageDeclarations(Lorg/eclipse/core/resources/IWorkspace;)V org/eclipse/jdt/core/search/SearchEngine.search(Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/search/ISearchPattern;Lorg/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search/IJavaSearchResultCollector;)V org/eclipse/jdt/core/search/SearchEngine.search(Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/IJavaElement;ILorg/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search/IJavaSearchResultCollector;)V org/eclipse/jdt/internal/ui/search/JavaSearchOperation.execute(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation$1.run(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/core/internal/resources/Workspace.run(Lorg/eclipse/core/resources/IWorkspaceRunnable;Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation.run(Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jface/operation/ModalContext$ModalContextThread.run()V
Dani, which VM are you using to run Eclipse?
It happened when using J9.
Please annotate this PR if you can reproduce.
I alreaday state that I can't but thought you might see something in your code where you missed a guard. The problem is that the error is probably caused by a corrupt (don't know why) Java Model. You can close the bug. I'll file a new one if I see it again. The problem is that the worksapce will not help you since it did not appear again after restarting.
Ok this could be a bug in the JCL if it occurs only on J9 and not on any other VMs.
Closing as J9/JCL bug.
It seems fairly clear from the traceback that the issue is a zip file that J9 has determined is 'invalid'. Unfortunately, there isn't enough information in this PR to determine which zip file this is. Is there any way someone can track down which zip file? Claiming this is a J9/JCL bug is fine -- but without further information, it is basically impossible to track the bug down.
I could not reproduce in the workspace after restarting. My guess would be that it came from a corrupt Java Model. I would not conclude that this is a J9 bug.
Just curious: what makes you think that the Java Model is corrupt?
1. It happened during a Java search (I searched for a package fragment root) 2. Exiting and restarting made the problem go away (no change in the resources itself)
I still don't understand: what I see is that the VM/JCL sayed it was an invalid zip file, but this zip file appears to be valid as when you restarted everything was ok.
Couldn't the problem be caused because I searched for a folder in a resource project? Maybe this might help: I was playing around with .java files outside the buildpath and I think I added a .java file into that folder. If the .java would be registered in the Java Model (e.g. because the Java Editor has a working copy in hand) couldnt' then that (resource) folder be some sort of invalid pkgfrmtroot?
In this case, we don't create a JarPackageFragmentRoot but a regular PackageFragmentRoot (which doesn't attempt to open a zip file)