- Go to the Run configuration -> Remove all the target platform jars.
- Click on add required bundles.
- Check the
org.apache.felix.gogo.runtime
,org.apache.felix.gogo.shell
,org.eclipse.equinox.console
,org.eclipse.osgi
and your jar file. - The last and important step. Go to Setting-> check the checkbox of "Clear the configuration area before launching".
- Run the OSGi application now.
- Enjoy if it works for you as it worked for me.