Community
Participate
Working Groups
The following exception occurs for every folder mentioned in the classpath of the debug configuraiton. !MESSAGE Unable to access archive /home/venku/projects/Testing/JavaSlicer/Slicer/Throw !STACK 0 java.util.zip.ZipException: Is a directory at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:112) at java.util.zip.ZipFile.<init>(ZipFile.java:72) at org.eclipse.debug.internal.core.sourcelookup.SourceLookupUtils.getZipFile(SourceLookupUtils.java:67) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.getArchive(ExternalArchiveSourceContainer.java:193) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.findSourceElements(ExternalArchiveSourceContainer.java:79) at org.eclipse.debug.core.sourcelookup.containers.CompositeS
When a breakpoint is hit during the debug session, the mentioned exception occurs.
The exact version of eclispe is 3.1RC2. This exception does not occur on 3.1RC1.
I'm not able to reproduce this problem. Where is the class folder added to te classpath - i.e. from the build path, from the launch config class path, or the launch config source path (all work for me).
Well, I created a new debug session with no source attachments. Not even in the projects. I added a folder to the class path via "advanced->add external folder" and it generated the following entry in the .launch file. <listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" externalArchive="/home/ venku/projects/Testing/JavaSlicer/Slicer/Home"/> "/> However, when trying to view the source it printed out the following into the log file. !SUBENTRY 1 org.eclipse.debug.core 4 120 2005-06-14 18:39:27.385 !MESSAGE Source lookup error !SUBENTRY 2 org.eclipse.debug.core 4 120 2005-06-14 18:39:27.386 !MESSAGE Unable to access archive /home/venku/projects/Testing/JavaSlicer/Slicer/Home !STACK 0 java.util.zip.ZipException: Is a directory at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:112) at java.util.zip.ZipFile.<init>(ZipFile.java:72) at org.eclipse.debug.internal.core.sourcelookup.SourceLookupUtils.getZipFile(SourceLookupUtils.java:67) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.getArchive(ExternalArchiveSourceContainer.java:193) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.findSourceElements(ExternalArchiveSourceContainer.java:79) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSourceElements(CompositeSourceContainer.java:78) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSourceElements(CompositeSourceContainer.java:45) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant.findSourceElements(AbstractSourceLookupParticipant.java:67) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQuery.run(AbstractSourceLookupDirector.java:126) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup(AbstractSourceLookupDirector.java:461) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceElement(AbstractSourceLookupDirector.java:711) at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.lookup(SourceLookupFacility.java:138) at org.eclipse.debug.ui.DebugUITools.lookupSource(DebugUITools.java:658) at org.eclipse.debug.internal.ui.views.launch.LaunchView$SourceLookupJob.run(LaunchView.java:176) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) After this run, I installed 3.1RC1 on top of 3.1RC2 and the debug session worked fine. In fact, it even worked with "variable string" based classpaths defying the (unfixed) bug 77773.
Fixed in JavaSourceLookupUtil and PackageFragmentRootSourceContainer. Incorrectly creating archive source containers for folders/directories.
Please verify, Kevin.
verified
I tried 3.1RC3 and the fix worked but it did result in a new failure. The source files in the project are not being found. I turned on the debug flags via .options file and only the following archives were searched for the source file when a breakpoint was reached. The source lookup path was set by using the "Restore default". [reading java/io/PrintStream.class] Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/rt.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/rt.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/rt.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/sunrsasign.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/sunrsasign.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/sunrsasign.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/jsse.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/jsse.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/jsse.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/jce.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/jce.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/jce.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/charsets.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/charsets.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/charsets.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/ext/sunjce_provider.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/sunjce_provider.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/sunjce_provider.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/ext/dnsns.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/dnsns.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/dnsns.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/ext/ldapsec.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/ldapsec.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/ldapsec.jar Thread[Worker-17,5,main] OPENING class file Test.class [in <default> [in /usr/local/jdk1.4.2/jre/lib/ext/localedata.jar [in test]]] (Thread[Worker-17,5,main]) [JavaModelManager.getZipFile(IPath)] Creating ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/localedata.jar (Thread[Worker-17,5,main]) [JavaModelManager.closeZipFile(ZipFile)] Closing ZipFile on /usr/local/jdk1.4.2/jre/lib/ext/localedata.jar
Created attachment 23509 [details] An example workspace that causes the error
Created attachment 23510 [details] An example workspace that causes the error I have removed a .index file as that was 6MB.
I tried to debug and found something weird in org.eclipse.debug.internal.core.sourcelookup.containers.ContainerSourceContainer.findSourceElements(String) At line 121 in ContainerSourceContainer.java osFile="/home/venku/workspace/installations/eclipse/workspace/test/Test.java" canonicalPath="/workspace/installations/eclipse/workspace/test/Test.java" canonicalSegments="[workspace, installations, eclipse, workspace, test, Test.java]" workspacePath="workspace/installations/eclipse/workspace/test/Test.java" Subsequent invocation fRoot.findFilesForLocation(workspacePath) at line 121 returns an empty array as there is no such location as mentioned by workspacePath. On my Linux box I start eclispe with "eclipse -data /home/venku/workspace/eclipse" where "/home/venku/workspace" is a symbolic link ot "/workspace". So, canonicalPath.getDevice() should return the device on which "/" is hosted. Instead it returns null which I think is incorrect.
The new problem is a different bug - a new bug report should be opened for the problem. Marking this bug as fixed.
Verified.