Community
Participate
Working Groups
-- Error Log -- Date: Thu Mar 13 16:40:46 CLT 2008 Message: Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ui". Severity: Error Plugin ID: org.eclipse.jdt.ui Stack Trace: java.lang.ClassCastException: org.eclipse.jdt.internal.core.JarEntryFile at org.eclipse.jdt.internal.core.JarPackageFragment.computeNonJavaResources(JarPackageFragment.java:117) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:105) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:248) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:221) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:285) at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2201) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:53) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:67) at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:505) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:867) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:651) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:609) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:602) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:514) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:155) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:140) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
It would be interesting to get: - build id - steps to reproduce (setup of your project)
*** Platform Details: *** System properties: awt.toolkit=sun.awt.windows.WToolkit eclipse.buildId=M20080221-1800 eclipse.commands=-os win32 -ws win32 -arch x86 -showsplash C:\cyanez\eclipse\\plugins\org.eclipse.platform_3.3.3.r33x_r20080129\splash.bmp -launcher C:\cyanez\eclipse\eclipse.exe -name Eclipse --launcher.library C:\cyanez\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll -startup C:\cyanez\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar -vm C:\cyanez\jdk1.5.0_15\jre\bin\server\jvm.dll eclipse.ee.install.verify=false eclipse.product=org.eclipse.platform.ide eclipse.startTime=1205500438765 eclipse.vm=C:\cyanez\jdk1.5.0_15\jre\bin\server\jvm.dll eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5 -Xms90m -Xmx512m -XX:MaxPermSize=256M -Djava.class.path=C:\cyanez\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar eof=eof ...
Here are the steps: - Unzip eclipse-jee-europa-winter-win32.zip. - Configure vm arguments (this step is optional, using default arguments has the same result) - Open eclipse and create a new workspace - Configure Maven repository's variable (or install m2 plugin 0.0.12.20071107-2300 using update manager) * (The critical step) Import my proyect into workspace (selecting copy option) from a previos eclipse (version: 3.2.2 build id: M20070212-1330) - After importing was finish and my project started to build ("build automatically" option is selected) the ClassCastException was thrown. Now if I open the workbench or simple roll the cursor over any method of my java classes, I get the same exception over and over. My original proyect is configured with maven2, subversion, spring and xfire and it still working on the "old" eclipse 3.2 Cristián.
Unfortunately we don't have your project (critical steps), so it is impossible for us to reproduce the problem. Looking at the code, I don't see how this can happen. Ideally we would need a small project that reproduce the problem and that you would attach to this bug report. Without more information, there is not much we can do.
Created attachment 95999 [details] Test Project Hi again. Finally I created a little project to reproduce the bug. I guess the problematic file is a custom jar named security-1.1.jar, so I added to the zip file (with its source code) and referenced into the project. I hope this help. Cristián
Thanks for the test case. I was able to reproduce the ClassCastException by expanding security-1.1.jar in the Package Explorer. It looks like this jar contains an entry named 'META-INF' that claims to be a file (and not a directory as one could expect). I will investigate a workaround for this kind of unconventional jar.
Created attachment 100884 [details] Proposed fix and regression test
Since this is not a regression comparing to 3.3.2, will target 3.5
Fix and test released for 3.5M1. Will backport to 3.4.1 since this is an exception and there is no workaround.
Fix and test released for 3.4.1
Verified for 3.5M1 using I20080805-1307
Reopen to close as RESOLVED/FIXED. Will be closed as VERIFIED during 3.4.1 verification pass.
Fixed.
Verified for 3.4.1 using build M20080827-2000.