I try to build a java project with eclipse.
During the complilation I have error java.lang.RuntimeException: No application id has been found. So I read that I need to add required plugins. I went to Run Configuration -> Plug-ins tab, push button Add Required Plug-ins and then validate plug-ins. I have my own plugin in the project. So I get com.blablabla is missing. How can I add my plugin to plugins list?
UPD: MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.blabla.cc; singleton:=true
Bundle-Version: 0.0.0.REL
Bundle-Activator: com.blabla.ui.cc.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.core.expressions;bundle-version="3.4.1",
com.blabla.core,
com.blabla..shared,
com.blabla.ui.core,
com.blabla.ui,
org.eclipse.jface.text,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
org.eclipse.core.filesystem,
org.eclipse.ui.ide,
org.eclipse.ui.views,
org.apache.axis,
org.eclipse.wst.xml.core
Eclipse-LazyStart: true
Bundle-ClassPath: lib/SCESchemaCodeCcWorkbench.jar,
lib/DebugUtils.jar,
bin,
icons,
myApplicationUI.jar,
lib/batik-awt-util.jar,
lib/batik-bridge.jar,
lib/batik-css.jar,
lib/batik-dom.jar,
lib/batik-ext.jar,
lib/batik-gvt.jar,
lib/batik-parser.jar,
lib/batik-script.jar,
lib/batik-svg-dom.jar,
lib/batik-swing.jar,
lib/batik-util.jar,
lib/batik-xml.jar,
lib/xml-apis-dom3.jar,
lib/batik-transcoder.jar,
lib/batik-anim.jar,
lib/batik-codec.jar,
lib/batik-extension.jar,
lib/batik-gui-util.jar,
lib/batik-svggen.jar,
lib/xml-apis-ext.jar
Export-Package: com.blabla.sce.schema.code.ccworkbench,
com.blabla.sce.schema.code.ccworkbench.types
Implementation-Version: 0.0.0.REL
Bundle-Localization: plugin
Related
I'm redoing a legacy code from a plugin for eclipse ide, but I'm having problems with the following imported libraries:
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.PackageFragment;
The error message reported in the Ide and the following:
The import org.eclipse.jdt.core cannot be resolved
The import org.eclipse.jdt.internal.core cannot be resolved
I also have a problem with the following import in the MANIFEST.MF file.
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.wb.core.java;bundle-version="1.5.2"
The error message reported in the Ide and the following:
Bundle 'org.eclipse.wb.core.java' cannot be resolved
I wonder if I need to install some dependency or if the path changed.
Edit 1 The complete MANIFEST.MF.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ModuloAnalysis
Bundle-SymbolicName: ModuloAnalysis; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: moduloanalysis.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt.core,
org.eclipse.wb.core.java;bundle-version="1.5.2"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/smellplatform.jar,
.,
lib/weka.jar
Import-Package: org.eclipse.core.resources,
org.eclipse.debug.core,
org.eclipse.debug.core.model,
org.eclipse.jdt.debug.core,
org.eclipse.jdt.internal.debug.ui.actions
The org.eclipse.jdt.core.xxx imports require you to add the org.eclipse.jdt.core plugin to the Require-Bundle list in the MANIFEST.MF
org.eclipse.jdt.internal.core.PackageFragment is also in org.eclipse.jdt.core however this is an internal class so the code is breaking the rules by using it.
I think org.eclipse.wb is WindowBuilder - do you have that in your target platform?
I'm trying to make a plugin for eclipse, I had to migrate some code that was being duplicated between a similar project and my own to a new project. In the new project I set the package I needed to be exported via the manifest file. Adding this exported package as a dependency works and the option to import it even shows up in the little "quick fix" box.
When I add the import declaration an error occurs and it says that the import cannot be resolved. I'm a little perplexed because it is a local project and the exported package can be added as a dependency without an issues and the tooltip popup tells me to import this package but then cannot resolve the dependency?
Here is the full error message The import de.fu_berlin.inf.archnemesis.core cannot be resolved
Here is the manifest for the plugin that is exporting the package:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: archnemesis-core-rule
Bundle-SymbolicName: archnemesis-core-rule
Bundle-Version: 1.0.0.qualifier
Require-Bundle: de.fu_berlin.inf.archnemesis;bundle-version="1.0.0"
Export-Package: de.fu_berlin.inf.archnemesis.core.chralx;uses:="org.eclipse.emf.ecore,de.fu_berlin.inf.archnemesis.archnemesis"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Here is the manifest for the plugin that is importing:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: archnemesis-pmd-rule
Bundle-SymbolicName: archnemesis-pmd-rule
Bundle-Version: 1.0.0.qualifier
Fragment-Host: net.sourceforge.pmd.eclipse.plugin;bundle-version="4.0.7.v20150522-1709"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: de.fu_berlin.inf.archnemesis;bundle-version="1.0.0",
org.junit
Import-Package: de.fu_berlin.inf.archnemesis.core.chralx,
net.sourceforge.pmd,
net.sourceforge.pmd.eclipse.core
The package I'm trying to work with is the de.fu_berlin.inf.archnemesis.core.chralx package.
You must list every package you want the plugin to export. You have listed de.fu_berlin.inf.archnemesis.core.chralx but not de.fu_berlin.inf.archnemesis.core which is the one you are try to use.
I am developing an Eclipse plugin. That is using UI and file resources. Which required org.eclipse.core.resources;bundle-version="3.8.101" and filed if this dependency is not available on target eclipse.
Eclipse version: Juno (for Android development).
I want to install this jar if not available on target Eclipse. So my plugin run without any issue for target Eclipse.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ABC
Bundle-SymbolicName: ABC;singleton:=true
Bundle-Version: 1.0
Bundle-Activator: magic.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="3.8.101"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
libs/java-json.jar,
libs/json-lib-2.4-jdk15.jar
Here is the error I got while installation
Cannot complete the install because one or more required items could not be found.
Software being installed: Feature 1.0.0 (com.confiz.android.codegen.feature.feature.group 1.0.0)
Missing requirement: Feature 1.0.0 (com.confiz.android.codegen.feature.feature.group 1.0.0) requires 'org.eclipse.core.resources 3.8.101' but it could not be found
I have a bundle A that depends on bundle B. When code in bundle A runs and accesses a class from bundle B then the state of bundle B is resolved (4) instead of active (32) and the activator of bundle B didn't run as well. I assume there's something wrong the manifest of bundle B but I can't quite spot it.
This is the manifest of bundle B, generated with bnd.
Manifest-Version: 1.0
Export-Package: org.jboss.logging;uses:="org.osgi.framework,org.eclips
e.equinox.log,org.jboss.logmanager,org.apache.log4j,org.slf4j.spi,org
.slf4j";version="3.2.0.Beta1-SNAPSHOT"
Build-Timestamp: Sun, 17 Mar 2013 15:07:31 +0100
Tool: Bnd-0.0.357
Bundle-Name: JBoss Logging 3
Created-By: 1.7.0_10 (Oracle Corporation)
Bundle-Vendor: JBoss by Red Hat
Scm-Revision: 9e799bac390dbbf9c7cd55afe93dff9265fbed05
Bundle-Version: 3.2.0.Beta1-SNAPSHOT
Bnd-LastModified: 1363529254048
Bundle-ManifestVersion: 2
Bundle-Activator: org.jboss.logging.Activator
Bundle-Description: The JBoss Logging Framework
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-SymbolicName: org.jboss.logging.jboss-logging
Import-Package: org.apache.log4j;resolution:=optional,org.eclipse.equi
nox.log;resolution:=optional;version="1.0",org.jboss.logging;version=
"3.2",org.jboss.logmanager;resolution:=optional,org.osgi.framework;ve
rsion="1.7",org.slf4j;resolution:=optional;version="1.6",org.slf4j.sp
i;resolution:=optional;version="1.6"
Bundle-DocURL: http://www.jboss.org
This the manifest of bundle A generated with PDE.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Sample-view
Bundle-SymbolicName: sample-view; singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
org.jboss.logging.jboss-logging
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Sigh. I bet you run on Equinox. In their eternal wisdom the Eclipse guys decided not to start bundles, being afraid it would overload the system. Trying to get a bundle started is REALLY overly complex in Eclipse. However, in your case there is a simple solution: OSGi Activation Policy. This will start your bundle when the first class is loaded. Just add to B
Bundle-ActivationPolicy: lazy
i just migrated from Equinox to Apache Felix. Now there is the javax.sql.datasource class missing:
java.lang.NoClassDefFoundError: javax/sql/DataSource
My bundle is importing javax.sql in the manifest file and i tried to add the following line to the felix config:
org.osgi.framework.system.packages.extra=javax.sql
Is there any way to teach felix to export the bundle or is there a bundle that does it? It worked fine in Equinox even without the import statement in the manifest.
EDIT:
The manifest file:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Database
Bundle-SymbolicName: ...database
Bundle-Version: 1.0.0
Import-Package: javax.sql,
org.osgi.framework;version="1.3.0",
org.osgi.service.component;version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: lib/mysql-connector-java-5.1.20-bin.jar,
.
Export-Package: ...database.model,
...database.service
Service-Component: OSGI-INF/component.xml
Thanks,
Daniel
Felix does already export this package.
More likely is that there may be something wrong with your Import-Package statement. You did state that your bundle imports the package, but please post a copy of your MANIFEST.MF to be sure.