Community
Participate
Working Groups
I zipped up three of my plugins so that they would be single jar files. I dropped them into the plugins directory, but they would not load properly. I'll attach the plugins and the full .log file, but here is the first log entry: !SESSION Nov 12, 2004 12:56:48.209 -------------------------------------------- - eclipse.buildId=M200409161125 java.version=1.4.2_05 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US !ENTRY org.eclipse.osgi Nov 12, 2004 12:56:48.209 !MESSAGE An error occured while automatically activating bundle org.eclipse.perfmsr.ui (52). !STACK 0 org.osgi.framework.BundleException: The activator org.eclipse.perfmsr.ui.PerfMsrUIPlugin for bundle org.eclipse.perfmsr.ui is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator (AbstractBundle.java:158) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start (BundleContextImpl.java:933) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker (BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start (AbstractBundle.java:293) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass (EclipseClassLoader.java:110) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass (BundleLoader.java:371) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java:402) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass (AbstractClassLoader.java:93) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (BundleLoader.java:307) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass (BundleHost.java:336) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass (AbstractBundle.java:1313) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensi on(ConfigurationElement.java:131) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensi on(ConfigurationElement.java:124) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensi on(ConfigurationElement.java:113) at org.eclipse.ui.internal.WorkbenchPlugin$1.run (WorkbenchPlugin.java:196) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:51) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension (WorkbenchPlugin.java:193) at org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension (EarlyStartupRunnable.java:109) at org.eclipse.ui.internal.EarlyStartupRunnable.run (EarlyStartupRunnable.java:61) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.ui.internal.Workbench$15.run(Workbench.java:1283) at java.lang.Thread.run(Unknown Source)
Created attachment 15829 [details] The .log file
Created attachment 15830 [details] sample plugins This zip file contains the three plugins that I was testing.
Although not optimal for running large products this mode should be supported but it seems that there is a bug, since the inner jars do not get unzipped into the org.eclipse.osgi folder of the configuration area. A better approach for running large products out of jars is to: - unzip the code jar at the same level than the resources (or in a folder) - change the library entry in the plugin xml to refer to the source For example: org.eclipse.perfmsr.core will become (in the top level jar): plugin.xml (with library set to "binaries/") binaries/ org/eclipse/perfmsr/core/A.class org/eclipse/perfmsr/core/B.class ... If you want to have the class files at the root, the library value becomes ".". Assigning to Tom to investigate the initial problem.
Never mind, the windows explorer tricked me.
Created attachment 15831 [details] .log file This is the .log file from my second attempt. In this attempt I: 1) deleted the source jars 2) expanded and then removed the code jars 3) copied the manifest file from the configuration directory, but removed the classpath line 4) edited the runtime stuff out of the plugin.xml file So this version of the plugins do not have any nested jar files
Created attachment 15832 [details] plugins The plugin jar files that Iused for my second attempt
Pascal, I looked into the initial problem. The jars are extracted. It is the PluginConverter that does not seem to generate the Provide-Package list correctly for the inner jars. So the framework cannot find packages from required bundles.
Gary, the manifest files you copied in comment 5 will be incorrect because they are missing the Provide-Package header. This will cause the same errors to occur as your original jar'ed bundles. You should look at using the manifest files that get generated for you plugins when the are fully extracted plugins.
I've been tricked by the file explorer :) What is interesting that if I unjar the plugins to be like in eclipse the plugin works fine. If I run from the jar, some classes are being found but there is this strange exception that I haven't figured out yet (and won't be able to address today). Tom if you want to keep the investigation, go ahead. I'm not sure why in case of zipped plugin we would generate a bogus manifest.
Re: Comment 8 I can confirm, that once I manually added in the Provide-Package header that my plugins worked!
I ran into this problem while experimenting with the JavaWebStart/JNLP support. I debugged a bit, and the problem seems to happen in the PluginConverterImpl.getExports() method. This is where the jars containing the plugin classes need to be scanned to build a exported package list. In the jarred plugin case however, the jar file containing the classes is not correctly found, so the export list is empty. The following code is where things start to go wrong. pluginManifestLocation is the plugin jar file and libEntryText is the name of the library within the jar, so libraryLocation becomes non-existent. File libraryLocation; if (DevClassPathHelper.inDevelopmentMode()) { ... } else libraryLocation = new File(pluginManifestLocation, libEntryText); Set exports = null; if (libraryLocation.exists()) { if (libraryLocation.isFile()) exports = filterExport(getExportsFromJAR(libraryLocation), filter); //TODO Need to handle $xx$ variables else if (libraryLocation.isDirectory()) exports = filterExport(getExportsFromDir(libraryLocation), filter); } else { ...
Consider for M7. Patches welcomed.
The launcher feature in the delta pack is not up-to-date. Please try to replace the launcher feature of the delta pack with the one attached in bug #93171
Wrong bug report.
DJ and I did separate evaluations on how to fix this bug, and we both came to the same conclusion: "nay, too risky, too complicated for this late in the game". I will even go further saying that this is a wontfix because: - Eclipse 3.1 recommends shipping with MANIFEST.MF - Manifest support is now first class in PDE (which used a counter argument as to why we should not ship manifest before) I opened bug #97689 to add something in the README.
Cleaning up old defects.