Community
Participate
Working Groups
Build ID: I20080329212442 Steps to reproduce: 1. Start IDE in clean workspace. 2. Create a Dynamic Web Project. 3. Call the Servlet wizard and finish it. The Servlet is not created. Instead there are errors in the Problems view: Project '.JETEmitters' is missing required library: 'D:\eclipse\target-wtp3.0\eclipse\ce:file:plugins\org.eclipse.jst.j2ee_1.1.200.v200803290400.jar' Project '.JETEmitters' is missing required library: 'D:\eclipse\target-wtp3.0\eclipse\ce:file:plugins\org.eclipse.jst.j2ee.web_1.1.200.v200803270300.jar' The problem is that instead of "plugin" there is "ce:file:plugins" in the jar paths.
This problem should also explain some of the failing JEE JUnit tests.
The root cause appears to be in WTPJETEmmitter.getJarredPluginPath():484. There the location of the JAR is retrieved by calling "bundle.getLocation()". This method returns the location of the plugin JAR, but prefixed with "resource:file:". It seems that on line 484 there is an attempt to remove this prefix from the string - substring(7). I suppose that the prefix was shorter in previous releases of Eclipse SDK and it has been changed in the last days. The getJarredPluginPath() method is not called if the respective plugins are checked out in the workspace. This is why this problem did not appear in my dev environment.
Created attachment 94183 [details] patch Patch that replaces bundle.getLocation().substring(7); with FileLocator.getBundleFile(bundle).getPath();
Mid-air collision ... and looks like you've already gotten it ... but, for reference, there's what I was writing. Think this is related to bug 224384? Issues with getJarredPluginPath have been found in P2'd Platform, where we install our code in "eclipse/dropins" instead of in the old eclipse/plugins and features. The incorrect path look very similar to the original bug 224148. (which also provides a solution ... see https://bugs.eclipse.org/bugs/show_bug.cgi?id=224148#c9
And, just FYI, if required, we could declare with this bug, and say "we don't work with a P2 type install" with this I-build ... but, I certainly agree it should be fixed for M6, if not this I-build.
David, thank you for the additional references. I have just dropped to fix and released it to the build. This bug blocks smoke testing and I would not wish to declare this I-build in this case. I suggest we wait for the build and I will re-smoke. BTW, there is a build already running. Could we cancel it and trigger a new one? This will speed up the whole thing with an hour or two.
*** Bug 224384 has been marked as a duplicate of this bug. ***
Verified with wtp-sdk-I-I20080331115711-20080331115711
Closing