Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5843919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:13:16+00:00 2026-05-22T12:13:16+00:00

i cant figure out why the following happens: I am running an embedded apache

  • 0

i cant figure out why the following happens:

I am running an embedded apache felix from a small android application. I programmatically install 2 bundles after starting the framework, but both never enter the “resolved” state. Thereby the Bundle “MyBundle1” imports “MyBundle2”.

This is what Logcat tells me:

05-17 20:21:56.514: ERROR/MainActivity(384): org.osgi.framework.BundleException:    
Unresolved constraint in bundle de.xy.MyBundle1 [1]: Unable to resolve 1.11: missing   
requirement [1.11] package; (package=de.xy.MyBundle2) [caused by: Unable to resolve 2.0: 
missing requirement [2.0] package; (&(package=org.osgi.framework)(version>=1.5.0))]     

I totally understand what the error-message says (well…org.osgi.framework in version 1.5+ cant be resolved) but i cant figure out why this happens. Why cant the framework resolve “himself”?! I tried to run the same felix.jar as standalone with the adb shell , and both bundles work. Ofcourse, the felix.jar is up to date (3.2)

Thanks for your advice!

Daniel

FelixSetup

    m_configMap = new StringMap(false);
    try {
        m_cache = File.createTempFile("felix-cache", null);
    } catch (IOException ex) {
        throw new IllegalStateException(ex);
    }
    m_cache.delete();
    boolean mkdirs = m_cache.mkdirs();  // works (=true)
    m_activator = new HostActivator();  // implements BundleActivator 
    List list = new ArrayList();
    list.add(m_activator);
    m_configMap.put(FelixConstants.LOG_LEVEL_PROP, "1");
    m_configMap.put(BundleCache.CACHE_ROOTDIR_PROP, ".");
    m_configMap.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list);
    m_configMap.put(FelixConstants.FRAMEWORK_STORAGE, m_cache.getAbsolutePath()); 
    m_felix = new Felix(m_configMap);
    try {
        m_felix.start();
    } catch (BundleException ex) {
        Logger.getLogger(MainActivity.class.getName()).log(Level.SEVERE, null, ex);
    }

I dont know if it has something to do with the previous problems:

05-18 08:52:59.149: VERBOSE/out(363): Problem creating boot delegation class loader:      java.lang.reflect.InvocationTargetException
05-18 08:52:59.209: VERBOSE/out(363): ERROR: Error parsing system bundle export statement:  (java.lang.IllegalArgumentException:A header cannot be an empty string.)

05-18 08:52:59.209: VERBOSE/out(363): java.lang.IllegalArgumentException: A header cannot be an empty string.

I install and start the bundles with

myBundle1= bundleContext.installBundle("file:/data/felix/MyBundle1.jar"); 
myBundle2= bundleContext.installBundle("file:/data/felix/MyBundle2.jar"); 

myBundle1.start();

they were previously dx’ed and moved to /data/felix with adb push.

The same code I used in the android-application also works inside a regular java console-app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:13:17+00:00Added an answer on May 22, 2026 at 12:13 pm

    The way you build up the framework looks okay to me. You could consider

    • replacing the FRAMEWORK_SYSTEMPACKAGES by a list that is specific for Android, if your bundles will e.g. be using Activities), or
    • not using a temp file, but point to some directory you know exists.

    We have used 3.0.1 in the past successfully, and I do have the idea that the error message you posted has something to do with it. You could try that version of Felix, and if that works, you may have found a regression in Felix, which you can then report to users@felix.apache.org .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't figure out why the following wont work, any ideas?? public interface IFieldSimpleItem
I can't figure out why the following code fails: # test.ps1 `$args: ($args) `$args
I can't figure out why the following code doesn't work. For the time being,
For the life of me I can't figure out why the following getcookie code
I'm following the tutorial for ExtJS 4.x but I can't figure out something. I
The following code works, but I can't figure out what's going on memory-wise. Where
I have the following html and css. But what I can't figure out is
I have the following razor template html, although I can't figure out how to
I can't for the life of me figure out why the following produces the
I'm getting the following error message and I can't seem to figure out the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.