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

  • Home
  • SEARCH
  • 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 7981293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:19:30+00:00 2026-06-04T10:19:30+00:00

I have an osgi application (in felix) with multiple bundles. There are some common

  • 0

I have an osgi application (in felix) with multiple bundles. There are some common property files in one bundle and the rest of the bundles need just use them.

We use maven and spring osgi, the property files are in resouces like:

<path to bundle>/src/main/resources/
    common.properties
    engine.properties
    ...

Maven builds them inside the bundle jar normally so they should be in an application classpath, but Spring has no access to them, this fails:

<context:property-placeholder location="classpath:common.properties" />

(tried classpath*: and other combinations)

I’ve read this and this

Is it really some global issue with osgi ideology and no standard way to get it working? Only hacks and workarounds like that or <osgix:cmProperties...>?

It concerns because it makes deployment harder and error-prone: you can’t deploy property files inside jars with just mvn deploy as in normal application, – you’ll have to manually copy them to the production box on each release.

  • 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-04T10:19:32+00:00Added an answer on June 4, 2026 at 10:19 am

    With OSGi, there isn’t a universal application classpath. Although the properties are on the classpath of the bundle which contains them, they’re not necessarily on the classpath of the bundles using them.

    It’s a little bit ugly, but in general exporting the ‘package’ containing the property folders will make them accessible. In this case it looks like that would be ‘.’, which is very ugly, but you could put them in a ‘properties’ directory (say), and then export a properties package. Bundles which use those properties would also need to import the properties package.

    Alternatively, using the containing bundle’s classloader to look up the resource will work, although I can’t comment on what the Spring config for that would look like.

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

Sidebar

Related Questions

I have a server application that consists of multiple OSGi bundles, some mine, some
I have an application with many different parts, it runs on OSGi, so there's
I'm developing my application as a set of OSGi bundles using Maven 2. Some
I have a Java application. I created a OSGi bundle and in Activator.start i
I have been developing an application with Apache Felix as my OSGi runtime for
I try to get file as resource from bundle jar using Felix/OSGi. I have
I'm using some off-the-shelf OSGi bundles in my application and would like to repackage
I have been working on getting my OSGi application to run outside eclipse. It
I have a 3rd party JAR that I have converted to an OSGI bundle
I am currently working on some OSGi application and I wanted to use 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.