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 8817153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:46:44+00:00 2026-06-14T04:46:44+00:00

I am trying to create war hosting OSGi bundles. The complete configuration should be

  • 0

I am trying to create war hosting OSGi bundles. The complete configuration should be able to host WAB bundles, and now I try to integrate pax-web-extender-war for that.
It requires some dependencies like slf4j-api and slf4j-log4j12 and here is the problem: I always get this exception:

org.osgi.framework.BundleException: Fragment bundles can not be started.
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1782)

because slf4j-log4j12 is really a fragment bundle. I assumed Felix should cope with this but it does not. So I tried to move this jar to WEB-INF/lib but then wiring fails as osgi cannot resolve it as a bundle.

So,

  • Where should I put fragment bundles ?
  • Should it be somehow configured in framework.properties ?
  • is Apache Felix even capable of working with fragment bundles ?

Following is current layout of the war (note that it is based on felix http bridge sample):

.
└── WEB-INF
    ├── bundles
    │   ├── commons-fileupload-1.2.2.jar
    │   ├── commons-io-2.4.jar
    │   ├── hello-wab-1-SNAPSHOT.war
    │   ├── org.apache.felix.http.bridge-2.2.0.jar
    │   ├── org.apache.felix.http.samples.filter-2.2.0.jar
    │   ├── org.apache.felix.webconsole-4.0.0.jar
    │   ├── pax-web-api-2.1.0.jar
    │   ├── pax-web-extender-war-2.1.0.jar
    │   ├── pax-web-spi-2.1.0.jar
    │   ├── slf4j-api-1.6.6.jar
    │   ├── slf4j-log4j12-1.6.6.jar
    │   └── wrapper-json-1-SNAPSHOT.jar
    ├── classes
    │   └── org
    │       └── apache
    │           └── felix
    │               └── http
    │                   └── samples
    │                       └── bridge
    │                           ├── FrameworkService.class
    │                           ├── ProvisionActivator.class
    │                           └── StartupListener.class
    ├── framework.properties
    ├── lib
    │   ├── org.apache.felix.framework-4.0.3.jar
    │   ├── org.apache.felix.http.proxy-2.2.0.jar
    │   ├── org.apache.felix.webconsole-4.0.0.jar
    │   ├── org.osgi.compendium-4.3.0.jar
    │   └── wrapper-json-1-SNAPSHOT.jar
    └── web.xml
  • 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-06-14T04:46:45+00:00Added an answer on June 14, 2026 at 4:46 am

    I suggest adding pax-logging to your bundles, it’ll keep away the pain of logging in the OSGi world. Pax-Logging

    For the fragment-bundles you just need to add them to the usual bundles. I’d say in your setup probably in the bundles folder. Since it’s a fragment bundle the Exception you get is right, it’s not a “startable” bundle. It will only resolve and hopefully attached to the hosting bundle.

    By the way, Felix is capable of working with fragment bundles 🙂

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

Sidebar

Related Questions

I'm trying to create a war that is to be deployed in an EAR
I'm trying to create a simple Java webapp using IntelliJ (v11.1.3) and integrate it
I am trying to create a war file out of an eclipse project using
Hello I am trying to create a war file in netbeans7.0 but I am
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying create a delegate representation of constructor by emitting a Dynamic Method,
Ok so I am trying create a login script, here I am using PHP5
Trying to create a black line in my view to separate text blocks but
Trying to create a facebook app just to learn and coming across a strange
Trying to create a new Dedicated Cache Role in Windows Azure but get 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.