Eclipse plugin not visible - eclipse

im not sure whether its an issue with the plugin or eclipse.Recently im working on this plugin and i was using Indigo /JavaSE7 .When i launch it as an eclipse application im getting my plugin on top. I also exported it as a plugin(export>deployable plugins...) and put in the plugins folder, it is visible and working fine.I tried putting it in Eclipse/Galileo in my machine and it works fine.The problem is When my colleague puts this jar in Eclipse /Indigo Plugins folder(Any other system apart from mine) it is not visible and not even any signs of it.
i'm not sure if it has some thing to do with the JRE/SDK,please help me out.
Im attaching the manifest file if anything missing:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XTechnologySolutions
Bundle-SymbolicName: com.xquery.review.plugin; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.xquery.review.plugin.Activator
Bundle-Vendor: CognizantTechnologySolutions
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="3.7.101",
org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: src/lib/log4j-1.2.17.jar,
.,
src/lib/XQueryReview.jar
Import-Package: org.eclipse.jface.text
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
thanks in advance ...

Take a look at the answers from this Stackoverflow post... has good information on how to debug plugin loading issues
Eclipse doesn't load plugins in the dropins folder

Related

OSGI fragment not loading in production environment

I have a third party library which I loaded in a fragment, and coupled it to system.bundle, because it needs to be loaded in the root class path. In the development environment the code runs fine, but when I deploy it in a production environment, I get a ClassNotFoundException. The bundle that uses the fragment is started without problems, so I am not seeing any unusual behaviour in the list of active bundles, as compared to the IDE. The fragment is 'resolved', but this also applies in the development IDE
Does anyone have a clue to what I can do to investigate this issue further?
The fragment is defined as follows:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: {bundle-name}
Bundle-SymbolicName: org.mybundle.fragment;singleton:=true
Bundle-Version: 1.47.0.2
Bundle-Vendor: Condast
Fragment-Host: system.bundle
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: {theLibs},
.
Export-Package: {exported packages}
Edit/Update
It seems that this problem may actually have something to do with slf4j packages. I've stumbled upon a few similar posts, where slf4j interferes with the system.bundle. I'm looking into it..

Package does not exist in this plugin

I tried importing a plugin as a source project in my workspace. Now I am getting a package does not exist in this plugin error in the Manifest.mf file. But the packages do exist in the source folder of the same plugin. What could be the issue? I tried googling but I could find only these kind of errors when the package is coming from a different eclipse project. Pls give me some light on this
http://i.stack.imgur.com/g2lrE.png
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: xyz Plug-in 2.1.0
Bundle-SymbolicName: com.abc.xyz
Bundle-Version: 2.1.0
Bundle-ClassPath: xyz.jar
Bundle-Activator: com.abc.xyz.xyzPlugin
Bundle-Vendor: FHG
Bundle-Localization: plugin
Export-Package: xyz.common,
xyz.common.pattern,
xyz.cursor,
xyz.dm.common,
xyz.dom,
xyz.dom.bootModel,
xyz.dom.exception,
xyz.dom.x,
xyz.errmsg,
xyz.eventHandling,
xyz.mof,
xyz.mof.exception,
xyz.mof.x,
xyz.versioning.extent,
xyz.versioning.versionstore,
com.CH_co.cryptx,
com.CH_co.util,
com.abc.xyz,
com.abc.xyz.uuid,
com.tools,
config,
mdd.delta.model,
mdd.diffmerge,
mdd.diffmerge.event,
mdd.model,
transactionHandling,
uuidGenerator
Eclipse-AutoStart: true
Require-Bundle: org.eclipse.core.runtime,
com.abc.mdd.common
This is the manifest.mf file
The answer I found was a bit strange and I am unable to find the logic behind it. I deleted the errors in the Problems view and restarted the eclipse in clean mode. It started working. Pls let me know what could be the reason behind it

Include 3rd jar to eclipse plugin development

Firstly, I have tried the method given in official page of eclipse . But I really do not get my gson jar working, the error is still : Class not found.
This is my manifest.fm :
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Eclipseplugin
Bundle-SymbolicName: com.snipplr.eclipseplugin; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.snipplr.eclipseplugin.Activator
Bundle-Vendor: SNIPPLR
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jface.text;bundle-version="3.7.1",
org.eclipse.ui.editors;bundle-version="3.7.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: com.google.gson
Bundle-ClassPath: library.jar,
.
Import-Package: com.google.gson
I just declare a simple gson as : Gson gson = new Gson();
My question is:
What's wrong in my doing ?
After the success following Francis answer, I have another question. Can I simplify the steps to how to include 3rd jar :
Step 1 : add jar file to your project
Step 2 : Bundle-ClassPath: library.jar, . << Add bundle-classpath which lead to your jar to manifest.fm
Does it work ?
If you need any information, just ask in comment. I will watch this all day till it's done :P . Thanks
Your Bundle-Classpath needs to have gson.jar in it. You can do this in the manifest file directly, or on the Runtime tab add it to the classpath part with the GUI.
To answer your further questions:
Well step 2 would be to include your gson.jar file. I don't know what's in library.jar. As I said above you can do that through the GUI by using the classpath portion of the Runtime tab in the manifest editor. Adding it to the classpath there will also add it to your Java build classpath.
You also don't need to have the Export-Package for com.google.json if you are just using it in your plugin, the purpose of Export-Package is to provide it to another plugin that might use your plugin.

org.eclipse.jdt.ui.wizards.NewClassWizardPage available on Linux, but not on the Mac?

Most esteemed host of Eclipse magi ..
I am trying to create an instance of the org.eclipse.jdt.ui.wizards.NewClassWizardPage class. I have one project where I do this, and it will compile & run on Linux, but not on a Mac. Both machines are running the Helios edition of Eclipse with the PDE, both were downloaded with the last week.
The bundle org.eclipse.jdt.ui is available on the Mac, but for some reason the Mac will not compile the phrase
import org.eclipse.jdt.ui.wizards.NewClassWizardPage;
Saying "The import org.eclipse.jdt.ui.wizards.NewClassWizardPage cannot be resolved". The MANIFEST.MF is a simple one ..
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: RcpTest0
Bundle-SymbolicName: rcpTest0; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: rcptest0.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt,
org.eclipse.jdt.core,
org.eclipse.jdt.ui
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Your clues & boos are all most welcome.
Aha! The answer was that I had current versions of the JDT checked out in other projects in the workspace. They were being picked in preference over the JARs. Now to understand how I can get the PDE and JDT source bundles downloaded & installed.

Eclipse/OSGi class loading issue - java.lang.LinkageError when trying to load a plugin with two versions

In my Eclipse runtime, I have the following three plug-ins (file names simplified for better readability):
javax.wsdl.1.4.0.jar
javax.wsdl.1.5.1.jar
eclipse.wsdl.jar, which has a version restriction on the dependency: [1.4.0, 1.5.0)
The dependencies of my own plugin look like this:
eclipse.wsdl
javax.wsdl : "1.4.0"
When my own plugin tries to use the class WSDLFactory, an error would be thrown:
java.lang.LinkageError: loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#a7b0a7b" previously initiated loading for a different type with name "javax/wsdl/factory/WSDLFactory" defined by loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader#7c647c64"
Apparently, my own plug-in loads the 1.5.1 version of WSDLFactory, while eclipse.wsdl loads the 1.4.0 version of WSDLFactory, and this cause the conflict. If I change the version restriction of my plugin to be [1.4.0, 1.5.1), the code would work just fine. However, this is unacceptable since my code needs to support Eclipse 3.5 which forces to use javax.wsdl.1.5.1 intead of 1.4.0.
Are there any way to force my code to use the WSDLFactory loaded by eclipse.wsdl instead of trying to load its own?
And if possible at all, is there a way to force loading the lowest version (instead of highest) bundle?
Update: I tried both Require-Bundle and Import-Package and got different results in dev and release environment. Require-Bundle doesn't work for either one. Import-Package works in the dev environment but not in the release environment.
My question is, while Require-Bundle would try to load classes that are in the highest version of the plugin, does Import-Package NOT behave like that?
The following are corresponding MANIFEST.MF's:
Require-Bundle:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: wsdl.classloading.test; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: wsdl.classloading.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.wst.wsdl;bundle-version="1.1.202",
javax.wsdl;bundle-version="1.4.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: wsdl.classloading.test; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: wsdl.classloading.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.wst.wsdl;bundle-version="1.1.202"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: javax.wsdl,
javax.wsdl.factory,
javax.wsdl.xml