[Sat Nov 01 12:15:49 CET 2014] [ERROR] Unsuccessfully attempted to attach JarBundleResource {storage/default/3/bundle0 of bundle [log4j.apache-log4j-extras-1.1.0]} to JarBundleResource {storage/default/2/bundle0 of bundle [log4j-1.2.17]}
Exception: Conflicting import statement null from BundleRequirement{Import-Package javax.xml.parsers}
[Sat Nov 01 12:15:49 CET 2014] [DEBUG] Solution: MultiMap {JarBundleResource {storage/default/2/bundle0 of bundle [log4j-1.2.17]}=[{BundleRequirement{Import-Package javax.jmdns;resolution:=optional}->Export-Package javax.jmdns}, {BundleRequirement{Import-Package javax.management}->Export-Package javax.management}, {BundleRequirement{Import-Package javax.naming}->Export-Package javax.naming}, {BundleRequirement{Import-Package javax.xml.parsers}->Export-Package javax.xml.parsers}, {BundleRequirement{Import-Package org.w3c.dom}->Export-Package org.w3c.dom}, {BundleRequirement{Import-Package org.xml.sax}->Export-Package org.xml.sax}, {BundleRequirement{Import-Package org.xml.sax.helpers}->Export-Package org.xml.sax.helpers}], Concierge System Bundle=[{BundleRequirement{Import-Package javax.jmdns;resolution:=optional}->Export-Package javax.jmdns}, {BundleRequirement{Import-Package javax.management}->Export-Package javax.management}, {BundleRequirement{Import-Package javax.naming}->Export-Package javax.naming}, {BundleRequirement{Import-Package javax.xml.parsers}->Export-Package javax.xml.parsers}, {BundleRequirement{Import-Package org.w3c.dom}->Export-Package org.w3c.dom}, {BundleRequirement{Import-Package org.xml.sax}->Export-Package org.xml.sax}, {BundleRequirement{Import-Package org.xml.sax.helpers}->Export-Package org.xml.sax.helpers}]}
[Sat Nov 01 12:15:49 CET 2014] [INFO] framework: Bundle [log4j-1.2.17] started.
AFAI understand the problem is in BundleImpl.attachFragment(), which calls checkConflicts(): this will report an import statement conflict. See BundleImpl lines 2292ff
The host and fragment bundles manifest' are as:
host (log4j_1.2.17.jar)
Import-Package: javax.jmdns;resolution:=optional,
javax.jms;resolution:=optional,
javax.mail;resolution:=optional,
javax.mail.internet;resolution:=optional,
javax.management,javax.naming,
javax.xml.parsers,org.w3c.dom,org.xml.sax,org.xml.sax.helpers
fragment (log4j.apache-log4j-extras_1.1.0.jar)
Import-Package: javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,
javax.xml.transform.sax,javax.xml.transform.stream,org.apache.log4j.config,
org.apache.log4j.extras;version="1.1",org.apache.log4j.filter;version="1.1",
org.apache.log4j.or,org.apache.log4j.rolling;version="1.1",
org.apache.log4j.rule;version="1.1",org.w3c.dom,org.xml.sax,org.xml.sax.helpers
From what I see this should be OK as both imports will not use different version (unspecified). Maybe the conflict check has not only to consider the packages, but also its versions?
Just as side note: the package javax.xml.parsers will be taken from org.osgi.framework.system.packages.extra framework property. I think that should be not related to this issue, but just to state on that.
@Jan/Tim: is my assumption correct?
Bye, Jochen