Community
Participate
Working Groups
What steps will reproduce the problem? 1. Installed m2eclipse 2. Started seeing errors in Eclipse, looks like it's trying to open txt files as ZIP/JAR -- Error Details -- Date: Thu Feb 17 17:35:41 EST 2011 Message: Invalid ZIP archive: third-party/axis/axis2-1.5.4/lib/XmlSchema-LICENSE.txt [in trunk] Severity: Error Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.jee.product) Plugin: org.eclipse.jdt.core Session Data: eclipse.buildId=M20100909-0800 java.version=1.6.0_23 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product -clean Exception Stack Trace: org.eclipse.core.runtime.CoreException: I/O exception at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2524) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:152) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:78) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:252) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:225) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:290) at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2282) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:57) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:64) at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:162) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:255) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:190) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:89) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1244) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:178) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:133) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:398) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:127) at java.util.zip.ZipFile.<init>(ZipFile.java:144) at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2518) ... 27 more
moving to JDT core for comment
One of the reasons could be that invalid archive file was added to the project's build path. Can you please check if there are any warnings/errors of an invalid classpath entry?
This error was the result of XML and TXT files on the build path. What happened is that I wanted to add all the jars in the axis2/lib directory, and simply selected all the files in the directory (which had XML and TXT files mixed in with JAR files). Seems like the fix is one or both of the following: 1. Java Build Path's "Add JARs..." dialog should filter out all non-JAR files 2. Someone in the callstack should catch the IOException and log/ignore the error. It doesn't make sense to start throwing exceptions in the error log and preventing content assist from working if this is a recoverable error. Thanks! Mike
(In reply to comment #3) > Seems like the fix is one or both of the following: > 1. Java Build Path's "Add JARs..." dialog should filter out all non-JAR files This should be done in the UI. Moving to JDT/UI
*** This bug has been marked as a duplicate of bug 229042 ***