Hi guys, I´m trying to run the latest felix.jar on an android emulator and later on on a android device running android 2.3. The provided .zip on
*http://felix.apache.org/site/apache-felix-framework-and-google-android.html <http://felix.apache.org/site/apache-felix-framework-and-google-android.html> * (including felix.jar) runs without problems. However when I use felix.jar 4.4.1, it´s not working properly. I dexed the felix.jar as well as shell and shell.tui using the tools provided by the android sdk and added the .dex files to the bundles. After that, I´m uploading the file structure extracted from the zip file to the */data/* directory of the emulator, which includes the following config.properties under the *conf* folder: (shell and shell.tui are commented, because it seems that felix.jar cannot be started.) *# Licensed to the Apache Software Foundation (ASF) under one* *# or more contributor license agreements. See the NOTICE file* *# distributed with this work for additional information* *# regarding copyright ownership. The ASF licenses this file* *# to you under the Apache License, Version 2.0 (the* *# "License"); you may not use this file except in compliance* *# with the License. You may obtain a copy of the License at* *#* *# http://www.apache.org/licenses/LICENSE-2.0 <http://www.apache.org/licenses/LICENSE-2.0>* *#* *# Unless required by applicable law or agreed to in writing,* *# software distributed under the License is distributed on an* *# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY* *# KIND, either express or implied. See the License for the* *# specific language governing permissions and limitations* *# under the License.* *#* *# Framework config properties.* *#* *org.osgi.framework.system.packages=org.osgi.framework; version=1.7, \* * org.osgi.service.packageadmin; version=1.2, \* * org.osgi.service.startlevel; version=1.1, \* * org.osgi.service.url; version=1.0, \* * org.osgi.util.tracker; version=1.5.1, \* * javax.swing; \* * javax.swing.event; \* * javax.swing.table; \* * javax.swing.text; \* * javax.imageio;\* * org.w3c.dom; \* * org.xml.sax; \* * org.xml.sax.helpers; \* * org.xml.sax.ext; \* * sun.misc; \* * sun.security.action; \* * javax.xml.parsers;\* * org.apache.xml.serialize;\* * javax.xml.transform;\* * javax.xml.transform.dom;\* * javax.xml.transform.stream;\* * net.java.stun4j;\* * net.java.stun4j.client;\* * javax.sound;\* * javax.sound.sampled; \* * javax.naming; \* * javax.naming.directory; \* * javax.net <http://javax.net>; \* * javax.net.ssl; \* * ${dalvik-1.0.0-m3-r22a}* *#org.osgi.framework.bootdelegation=sun.*,com.sun.** *felix.cache.profiledir=foo* *#felix.auto.start.1= \* *#file:bundle/org.apache.felix.shell-1.4.3.jar \* *#file:bundle/org.apache.felix.shell.tui-1.4.1.jar* *felix.log.level=4* *felix.startlevel.framework=1* *felix.startlevel.bundle=1* *felix.service.urlhandlers=false* *#* *# Bundle config properties.* *#* *org.osgi.service.http.port=8080* *osgi.shell.telnet=on* *#* *# Java platform package export properties.* *#* *dalvik-1.0.0-m3-r22a=, \* *android; \* *android.app; \* *android.content; \* *android.database; \* *android.database.sqlite; \* *android.graphics; \* *android.graphics.drawable; \* *android.graphics.glutils; \* *android.hardware; \* *android.location; \* *android.media; \* *android.net <http://android.net>; \* *android.opengl; \* *android.os; \* *android.provider; \* *android.sax; \* *android.speech.recognition; \* *android.telephony; \* *android.telephony.gsm; \* *android.text; \* *android.text.method; \* *android.text.style; \* *android.text.util; \* *android.util; \* *android.view; \* *android.view.animation; \* *android.webkit; \* *android.widget; \* *com.google.android.maps; \* *com.google.android.xmppService; \* *javax.crypto; \* *javax.crypto.interfaces; \* *javax.crypto.spec; \* *javax.microedition.khronos.opengles; \* *javax.net <http://javax.net>; \* *javax.net.ssl; \* *javax.security.auth; \* *javax.security.auth.callback; \* *javax.security.auth.login; \* *javax.security.auth.x500; \* *javax.security.cert; \* *javax.sound.midi; \* *javax.sound.midi.spi; \* *javax.sound.sampled; \* *javax.sound.sampled.spi; \* *javax.sql; \* *javax.xml.parsers; \* *junit.extensions; \* *junit.framework; \* *org.apache.commons.codec; \* *org.apache.commons.codec.binary; \* *org.apache.commons.codec.language; \* *org.apache.commons.codec.net <http://org.apache.commons.codec.net>; \* *org.apache.commons.httpclient; \* *org.apache.commons.httpclient.auth; \* *org.apache.commons.httpclient.cookie; \* *org.apache.commons.httpclient.methods; \* *org.apache.commons.httpclient.methods.multipart; \* *org.apache.commons.httpclient.params; \* *org.apache.commons.httpclient.protocol; \* *org.apache.commons.httpclient.util; \* *org.bluez; \* *org.json; \* *org.w3c.dom; \* *org.xml.sax; \* *org.xml.sax.ext; \* *org.xml.sax.helpers; \* *version=\"1.0.0.m3_rc22a\"* When I try to run the felix.sh script: *#/bin/sh* */system/bin/dalvikvm -Xbootclasspath:/system/framework/core.jar -classpath bin/felix.jar org.apache.felix.main.Main* the following exception occures: *ERROR: Error parsing system bundle export statement: org.osgi.framework; version=1.7, org.osgi.service.packageadmin; version=1.2, org.osgi.service.startlevel; version=1.1, org.osgi.service.url; version=1.0, org.osgi.util.tracker; version=1.5.1, javax.swing; javax.swing.event; javax.swing.table; javax.swing.text; javax.imageio;org.w3c.dom; org.xml.sax; org.xml.sax.helpers; org.xml.sax.ext; sun.misc; sun.security.action; javax.xml.parsers;org.apache.xml.serialize;javax.xml.transform;javax.xml.transform.dom;javax.xml.transform.stream;net.java.stun4j;net.java.stun4j.client;javax.sound;javax.sound.sampled; javax.naming; javax.naming.directory; javax.net <http://javax.net>; javax.net.ssl; , android; android.app; android.content; android.database; android.database.sqlite; android.graphics; android.graphics.drawable; android.graphics.glutils; android.hardware; android.location; android.media; android.net <http://android.net>; android.opengl; android.os; android.provider; android.sax; android.speech.recognition; android.telephony; android.telephony.gsm; android.text; android.text.method; android.text.style; android.text.util; android.util; android.view; android.view.animation; android.webkit; android.widget; com.google.android.maps; com.google.android.xmppService; javax.crypto; javax.crypto.interfaces; javax.crypto.spec; javax.microedition.khronos.opengles; javax.net <http://javax.net>; javax.net.ssl; javax.security.auth; javax.security.auth.callback; javax.security.auth.login; javax.security.auth.x500; javax.security.cert; javax.sound.midi; javax.sound.midi.spi; javax.sound.sampled; javax.sound.sampled.spi; javax.sql; javax.xml.parsers; junit.extensions; junit.framework; org.apache.commons.codec; org.apache.commons.codec.binary; org.apache.commons.codec.language; org.apache.commons.codec.net <http://org.apache.commons.codec.net>; org.apache.commons.httpclient; org.apache.commons.httpclient.auth; org.apache.commons.httpclient.cookie; org.apache.commons.httpclient.methods; org.apache.commons.httpclient.methods.multipart; org.apache.commons.httpclient.params; org.apache.commons.httpclient.protocol; org.apache.commons.httpclient.util; org.bluez; org.json; org.w3c.dom; org.xml.sax; org.xml.sax.ext; org.xml.sax.helpers; version="1.0.0.m3_rc22a" (org.osgi.framework.BundleException: Exported package names cannot be zero length.)* *org.osgi.framework.BundleException: Exported package names cannot be zero length.* * at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:768)* * at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:214)* * at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:229)* * at org.apache.felix.framework.Felix.<init>(Felix.java:388)* * at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)* * at org.apache.felix.main.Main.main(Main.java:287)* *Problem creating boot delegation class loader: java.lang.reflect.InvocationTargetException* I tried to analyze the issue and realized that using the latest felix.jar, the error case can be found here: *#* *# Java platform package export properties.* *#* *dalvik-1.0.0-m3-r22a=, \* *android; \* *...* Instead, I changed the export properties to *dalvik-1.0.0-m3-r22a=android; \* *...* which solved the *Exported package names cannot be zero length *issue*. * The exception however remained (no stack trace available): *Problem creating boot delegation class loader: java.lang.reflect.InvocationTargetException* Help is highly appreciated. Thanks and a happy new year to all of you. Stefan