Bug 19271 - IOException when searching for packages
Summary: IOException when searching for packages
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-05 05:30 EDT by Dani Megert CLA
Modified: 2002-06-07 11:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2002-06-05 05:30:04 EDT
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
Comment 1 Jerome Lanneluc CLA 2002-06-05 05:50:51 EDT
Dani, which VM are you using to run Eclipse?
Comment 2 Dani Megert CLA 2002-06-05 05:57:08 EDT
It happened when using J9.
Comment 3 Jerome Lanneluc CLA 2002-06-05 11:45:48 EDT
Please annotate this PR if you can reproduce.
Comment 4 Dani Megert CLA 2002-06-05 12:05:15 EDT
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.

Comment 5 Olivier Thomann CLA 2002-06-05 12:15:57 EDT
Ok this could be a bug in the JCL if it occurs only on J9 and not on any other VMs.
Comment 6 Jerome Lanneluc CLA 2002-06-06 05:26:52 EDT
Closing as J9/JCL bug.
Comment 7 Andrew Low CLA 2002-06-06 14:00:24 EDT
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.
Comment 8 Dani Megert CLA 2002-06-07 02:45:30 EDT
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.
Comment 9 Jerome Lanneluc CLA 2002-06-07 07:27:05 EDT
Just curious: what makes you think that the Java Model is corrupt?
Comment 10 Dani Megert CLA 2002-06-07 08:01:14 EDT
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)
Comment 11 Jerome Lanneluc CLA 2002-06-07 09:22:28 EDT
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.
Comment 12 Dani Megert CLA 2002-06-07 10:11:06 EDT
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?
Comment 13 Jerome Lanneluc CLA 2002-06-07 11:20:56 EDT
In this case, we don't create a JarPackageFragmentRoot but a regular 
PackageFragmentRoot (which doesn't attempt to open a zip file)