Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [concierge-dev] Bundle with same symbolic name already installed

Hi Chris,

the error that you see is because a jar file that does not have an OSGi manifest will get BundleSymbolicName null and version 0.0.0. As soon as you load two of them you get a conflict.

There are several ways to work around that.

The first and easiest is to find versions of your dependencies that have OSGi manifests. Apache, for instance, normally turns most of their libraries into OSGi bundles in case somebody wants to use it that way. If you experience the opposite, it might be because you are using a very old version. For instance, I checked version 1.2 of commons-logging and it has a proper manifest.

Another possibility is to embed dependencies into your bundle rather than having them be loaded as separate entities (or wrap them all up as a single dependency bundle). Depending on which plugin you use in Maven, there might be support for that. The Maven Felix plugin, for instance, can do that: http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#embedding-dependencies

Finally, if your libraries are not OSGi bundles you can also put them into the JVM classpath and let the Concierge system bundle export them by delegating to the classpath. What you need to do to make this happen is putting all relevant packages into -Dorg.osgi.framework.system.packages.extra

Best regards,

Jan.

Inactive hide details for Christoph Schauer ---09/16/2016 04:25:43 AM---Hi all, i'm trying to get eclipse smarthome running witChristoph Schauer ---09/16/2016 04:25:43 AM---Hi all, i'm trying to get eclipse smarthome running with concierge. I got this

From: Christoph Schauer <christoph.schauer@xxxxxxxxx>
To: concierge-dev@xxxxxxxxxxx
Date: 09/16/2016 04:25 AM
Subject: [concierge-dev] Bundle with same symbolic name already installed
Sent by: concierge-dev-bounces@xxxxxxxxxxx





Hi all,

i'm trying to get eclipse smarthome running with concierge. I got this working very easy by including all required osgi bundles and i was fascinated about the start-up time. Really cool. But now i'm trying to setup a maven build to automatically create a distribution package. I'm using plain maven dependencies, which means a lot of JARs from e.g maven central are not OSGi-fied.

Very often i got this exception:

Concierge> Exception in thread "main" org.osgi.framework.BundleException: Bundle with same symbolic name and same version is already installed
at org.eclipse.concierge.Concierge.checkForCollision(Concierge.java:3743)
at org.eclipse.concierge.BundleImpl.<init>(BundleImpl.java:231)
at org.eclipse.concierge.Concierge.installNewBundle(Concierge.java:4003)
at org.eclipse.concierge.Concierge.installNewBundle(Concierge.java:3966)
at org.eclipse.concierge.Concierge$BundleContextImpl.installBundle(Concierge.java:4587)
at org.eclipse.concierge.compat.service.XargsFileLauncher.processXargsInputStream(XargsFileLauncher.java:166)
at org.eclipse.concierge.compat.service.XargsFileLauncher.processXargsFile(XargsFileLauncher.java:70)
at org.eclipse.concierge.Concierge.doMain(Concierge.java:606)
at org.eclipse.concierge.Concierge.main(Concierge.java:525)

I realized that many jars does not have a manifest. So, this question occurred to me:
 - What is the bundle symbolic name / and version of a jar without a manifest?

I think you can reproduce this exception this way:
 - download commons-collection from maven central
 - download commons-logging from maven central
 - Try to start this bundles with concierge

Thanks. Kind regards
Chris

--

Christoph Schauer
Senior Softwareingenieur

QAware GmbH
Aschauer Str. 32
81549 München, Germany
Tel +49 89 232315-154
Fax +49 89 232315-129

christoph.schauer@xxxxxxxxx
www.qaware.de


Geschäftsführer: Christian Kamm, Bernd Schlüter, Johannes Weigend, Dr. Josef Adersberger
Registergericht: München
Handelsregisternummer: HRB 163761
_______________________________________________
concierge-dev mailing list
concierge-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/concierge-dev



Back to the top