Community
Participate
Working Groups
This bug appears in 3.2RC7. It is appearing when attempting to get the JavaDoc via the JavaDoc view or hover in the Java Editor. The related JAR file has the JavaDoc in the JAR and is configured using the JavaDoc Location specified against the JAR with a local file system path and the archive specific (doc) folder. The location passes validation. The JavaDoc for the related JAR appears the first time it is accessed, and the exception it throw thereafter. java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:398) at java.util.zip.ZipFile.getEntry(ZipFile.java:145) at java.util.jar.JarFile.getEntry(JarFile.java:194) at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:89) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:95) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107) at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734) at org.eclipse.jdt.internal.core.BinaryType.getJavadocContents(BinaryType.java:1086) at org.eclipse.jdt.internal.core.BinaryType.getAttachedJavadoc(BinaryType.java:998) at org.eclipse.jdt.ui.JavadocContentAccess.getHTMLContentReader(JavadocContentAccess.java:120) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:153) at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getHoverInfo(AbstractJavaEditorTextHover.java:121) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo(BestMatchHover.java:102) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo(JavaEditorTextHoverProxy.java:69) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:160)
Do you get it all the time? If yes, could you please to test it without validating it? Could be that the JARURLConnection is caching the zip file. I have never seen this problem on Linux or Windows. What SDK are you using?
I'm getting a similar exception when I use: <extension point="org.eclipse.pde.core.javadoc"> <javadoc path="docs.zip!/" archive="true"> <plugin id="myplugin"/> </javadoc> </extension> when typing "this." in a class extending a class located in "myplugin": Exception in thread "Thread-10" java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518) at java.util.zip.ZipFile.getEntry(ZipFile.java:251) at java.util.jar.JarFile.getEntry(JarFile.java:204) at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124) at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734) at org.eclipse.jdt.internal.core.BinaryType.getJavadocContents(BinaryType.java:1086) at org.eclipse.jdt.internal.core.BinaryMethod.getAttachedJavadoc(BinaryMethod.java:531) at org.eclipse.jdt.internal.core.BinaryMethod$1.run(BinaryMethod.java:210) Exception in thread "Thread-12" java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518) at java.util.zip.ZipFile.getEntry(ZipFile.java:251) at java.util.jar.JarFile.getEntry(JarFile.java:204) at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124) at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734) at org.eclipse.jdt.internal.core.BinaryType.getJavadocContents(BinaryType.java:1086) at org.eclipse.jdt.internal.core.BinaryMethod.getAttachedJavadoc(BinaryMethod.java:531) at org.eclipse.jdt.internal.core.BinaryMethod$1.run(BinaryMethod.java:210) When hovering over method names I get the same exceptions. Platform: Windows XP. Build: 3.2 final.
*** Bug 156307 has been marked as a duplicate of this bug. ***
I'll try to reproduce. This seems too late for 3.2.1.
I have the same problem on my linux box. I use two flavor of linux: Suse 9.2 and Linux Gentoo with java sun JDK 1.5.0_10. Often (but not always) when I press F2 to see the "Tooltip Description" of a method, I got a IllegaleStateException. I often get it when I want to visualize the javadoc of one of eclipse's own API component. I got this exception while trying to visualize the documentation of org.eclipse.swt.layout.GridLayout(Composite composite, int arg0) : !ENTRY org.eclipse.ui 4 4 2007-02-05 18:37:09.530 !MESSAGE "Show Tooltip Description" did not complete normally. Please see the log for more information. !ENTRY org.eclipse.ui 4 0 2007-02-05 18:37:09.535 !MESSAGE zip file closed !STACK 0 java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518) at java.util.zip.ZipFile.getEntry(ZipFile.java:251) at java.util.jar.JarFile.getEntry(JarFile.java:204) at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124) at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734) at org.eclipse.jdt.internal.core.BinaryType.getJavadocContents(BinaryType.java:1086) at org.eclipse.jdt.internal.core.BinaryType.getAttachedJavadoc(BinaryType.java:998) at org.eclipse.jdt.ui.JavadocContentAccess.getHTMLContentReader(JavadocContentAccess.java:120) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:153) at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getHoverInfo(AbstractJavaEditorTextHover.java:129) at org.eclipse.jdt.internal.ui.text.java.hover.JavaTypeHover.getHoverInfo(JavaTypeHover.java:54) at org.eclipse.jdt.internal.ui.text.java.hover.JavaInformationProvider.getInformation(JavaInformationProvider.java:141) at org.eclipse.jface.text.information.InformationPresenter.computeInformation(InformationPresenter.java:349) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:821) at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:811) at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:788) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1519) at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:178) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:201) at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:131) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:129) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$InformationDispatchAction.run(JavaEditor.java:778) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:461) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:466) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:799) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:846) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:564) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:506) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1343) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1109) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1094) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1121) at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:655) at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2082) at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:637) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1434) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3798) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5273) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1135) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
Did you use a bug newer than I20061024-0800 ?
Could not reproduce. This could have been fixed with fix for bug 156307. The code was actually released around M4 milestone. It is closed as M6 in order to go through the M6 verification loop. So could someone with a reproducable test case try again with 3.3M5, please? Closing as WORKSFORME. Reopen if this is reproducable with 3.3M5 and above.
Verified for 3.3 M6 using build I20070320-0010. Was not reproducable for a long time.