I’m trying to run a small EMF-based application on Apache Felix. Felix is running on a Android Device. I’m using Eclipse but without bnd and without maven.
I got a EMF Bundle that exports the packages of:
org.eclipse.emf.common_droid-2.7.0.v20120127-1122.jar
org.eclipse.emf.ecore_droid-2.7.0.v20120127-1122.jar
org.eclipse.emf.ecore.xmi_droid-2.7.0.v20120127-1122.jar
The Structure of my Plugin-Project:
[+] src
---> com.androidosgi.notifier
---> com.androidosgi.notifier.notification
---> com.androidosgi.notifier.notification.impl
---> com.androidosgi.notifier.notification.util
[+] META-INF
---> MANIFEST.MF
Notification-1.0.ecore
Notification-1.0.ecorediag
Notification-1.0.ecorert
NotificationComponent.xmi
The Activator is in com.androidosgi.notifier.
The MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Notification Testing
Bundle-SymbolicName: com.androidosgi.notifier
Bundle-Version: 12.6.5
Bundle-Activator: com.androidosgi.notifier.Activator
Bundle-Vendor: Homer Simpson
Import-Package:
com.androidosgi.notifier.notification,
com.androidosgi.notifier.notification.impl,
com.androidosgi.notifier.notification.util,
org.eclipse.emf.common,
org.eclipse.emf.common.archive,
org.eclipse.emf.common.command,
org.eclipse.emf.common.notify,
org.eclipse.emf.common.notify.impl,
org.eclipse.emf.common.util,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.impl,
org.eclipse.emf.ecore.plugin,
org.eclipse.emf.ecore.resource,
org.eclipse.emf.ecore.resource.impl,
org.eclipse.emf.ecore.util,
org.eclipse.emf.ecore.xmi,
org.eclipse.emf.ecore.xmi.impl,
org.eclipse.emf.ecore.xmi.util,
org.eclipse.emf.ecore.xml.namespace,
org.eclipse.emf.ecore.xml.namespace.impl,
org.eclipse.emf.ecore.xml.namespace.util,
org.eclipse.emf.ecore.xml.type,
org.eclipse.emf.ecore.xml.type.impl,
org.eclipse.emf.ecore.xml.type.internal,
org.eclipse.emf.ecore.xml.type.util,
org.osgi.framework;version="1.3.0"
Bundle-ClassPath: .
Export-Package: com.androidosgi.notifier;x-internal:=true,
com.androidosgi.notifier.notification;x-internal:=true,
com.androidosgi.notifier.notification.impl;x-internal:=true,
com.androidosgi.notifier.notification.util;x-internal:=true
Before I installed the bundle on the OSGi, I “dexed” it and added the classes.dex to the bundle.
If I try to start i get: NoClassDefFoundError
Any ideas or solutions ? 🙂 Thanks
Ok 50% is done 😉 It is running on a computer (Java 1.6) (but still not on Android) ! The NoClassDefFoundError Error caused in my case by the missing versioning stuff. I added the version in every package in the exporting EMF-Bundle(b1). I also added the version ranges on every package at the importing Notifier-Bundle(b2). Looks like that is very important to set the versions.
I also removed:
from the imports of the Bundle(b2) and all export from (b2).
Its running now on Apache Felix.
Uhh, I also added
to the manifest of the Bundle (b1), the EMF-Bundle.
My next problem is that the exports of the standard systembundle in android seems to be diffrent as it is on a normal computer (used the command “headers” to find out). I will start a new Question for that an post the link here.