Bug 1136104 - ModeShape JCR invalid OSGi meta-data
Summary: ModeShape JCR invalid OSGi meta-data
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: ModeShape
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER4
: 6.1.0
Assignee: Horia Chiorean
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-01 19:37 UTC by Julian Coleman
Modified: 2016-02-10 08:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-10 08:52:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
OSGi bundle workaround (1.08 KB, patch)
2014-09-01 19:42 UTC, Julian Coleman
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker MODE-2289 0 Blocker Resolved Incorrect OSGI manifest generated for the modeshape-jcr artifact 2016-03-09 13:31:59 UTC

Description Julian Coleman 2014-09-01 19:37:06 UTC
The ModeShape JCR jar (version 3.8.1) contains invalid OSGi meta-data.  This leads to errors with loading it in an OSGi container:

> Error executing command: Could not start bundle mvn:org.modeshape/modeshape-jcr/3.8.1.GA-redhat-1 in feature(s) s-ramp-dependencies-0.5.0.Beta3-redhat-1: Uses constraint violation. Unable to resolve bundle revision org.modeshape.jcr [551.0] because it exports package 'org.modeshape.common.util' and is also exposed to it from bundle revision org.modeshape.common [550.0] via the following dependency chain:
> 
>   org.modeshape.jcr [551.0]
>     import: (&(osgi.wiring.package=org.modeshape.common)(version>=3.8.0)(!(version>=4.0.0)))
>      |
>     export: osgi.wiring.package=org.modeshape.common; uses:=org.modeshape.common.util
>     export: osgi.wiring.package=org.modeshape.common.util
>   org.modeshape.common [550.0]

It looks like this is because the source contains a class under org.modeshape.common.util, and there are also classes under org.modeshape.common.util in the modeshape-common module.  This causes the OSGi export entry in MANIFEST.MF:

  org.modeshape.common.util;
    uses:="org.modeshape.common,org.modeshape.common.i18n,org.modeshape.common.annotation,org.modeshape.common.logging";version="3.8.1.GA-redhat-1",

which clashes with the (different) org.modeshape.common.util entry in the modeshape-common jar:

  org.modeshape.common.util;
    uses:="org.modeshape.common,org.modeshape.common.i18n,org.modeshape.common.annotation,org.modeshape.common.logging,org.modeshape.common.text";version="3.8.1.GA-redhat-1"

There are other classes not under org.modeshape.jcr, for example:

  org.modeshape.connector.filesystem;
    uses:="javax.jcr,org.modeshape.jcr.mimetype,org.modeshape.jcr.federation.spi
,org.infinispan.schematic.document,org.modeshape.jcr,org.modeshape.common.i18n,o
rg.modeshape.jcr.cache,org.modeshape.jcr.federation,org.modeshape.jcr.cache.docu
ment,org.modeshape.jcr.value,org.modeshape.jcr.api.nodetype,org.modeshape.common
.logging,org.modeshape.common.util,org.modeshape.jcr.value.binary,org.infinispan
.schematic,org.modeshape.common.text,org.modeshape.jcr.api";version="3.8.1.GA-re
dhat-1",

but these don't appear to clash with other jars currently.

Comment 2 Julian Coleman 2014-09-01 19:42:06 UTC
Created attachment 933517 [details]
OSGi bundle workaround

Workaround patch overriding the parent bundle configuration.

Comment 5 Horia Chiorean 2014-09-04 05:09:24 UTC
Fixed and merged into the product branch for DV 6.1: https://github.com/jboss-integration/modeshape/commit/807e12e1411a12c3e376c0b522062779620fd6d4

Comment 6 Filip Nguyen 2015-02-03 11:15:52 UTC
Verified. The org.modeshape.common.util doesn't define dependencies in modeshape-jcr*jar anymore.


Note You need to log in before you can comment on or make changes to this bug.