commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Sicker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DBCP-454) OSGi declarations contain multiple import headers for javax.transaction
Date Mon, 08 Aug 2016 17:16:20 GMT

    [ https://issues.apache.org/jira/browse/DBCP-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15412100#comment-15412100
] 

Matt Sicker commented on DBCP-454:
----------------------------------

I don't think that partial thing is correct, either. I get the following error when installing
this new version in Karaf 3.0.4:

{noformat}
java.lang.Exception: Could not start bundle mvn:org.apache.commons/commons-dbcp2/2.2 in feature(s)
commons-dbcp2-2.2: Unresolved constraint in bundle org.apache.commons.dbcp2 [269]: Unable
to resolve 269.0: missing requirement [269.0] osgi.wiring.package; (&(osgi.wiring.package=javax.transaction.xa)(version>=1.1.0)(partial=true))
	at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:521)[20:org.apache.karaf.features.core:3.0.4]
	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:476)[20:org.apache.karaf.features.core:3.0.4]
	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:417)[20:org.apache.karaf.features.core:3.0.4]
	at Proxy3ddcd89e_6018_4343_b5b3_8693418616e1.installFeature(Unknown Source)[:]
	at Proxy1c5ca9a8_a504_40c1_a273_6f4767d76de4.installFeature(Unknown Source)[:]
	at org.apache.karaf.kar.internal.KarServiceImpl.installFeatures(KarServiceImpl.java:215)[109:org.apache.karaf.kar.core:3.0.4]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:96)[109:org.apache.karaf.kar.core:3.0.4]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:84)[109:org.apache.karaf.kar.core:3.0.4]
	at Proxy670dd4c1_ba32_408b_9988_4daea71b6bc9.install(Unknown Source)[:]
	at Proxye95b24d0_c408_4277_a3ea_4b500b9f30a0.install(Unknown Source)[:]
	at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:50)[111:org.apache.karaf.deployer.kar:3.0.4]
	at Proxy370ffdac_0056_40be_877f_c9735fc99d7c.install(Unknown Source)[:]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:931)[7:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:865)[7:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:482)[7:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[7:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[7:org.apache.felix.fileinstall:3.5.0]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.commons.dbcp2
[269]: Unable to resolve 269.0: missing requirement [269.0] osgi.wiring.package; (&(osgi.wiring.package=javax.transaction.xa)(version>=1.1.0)(partial=true))
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)[org.apache.felix.framework-4.2.1.jar:]
	at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:518)[20:org.apache.karaf.features.core:3.0.4]
	... 16 more
{noformat}

I've installed the transaction feature first which imports JTA 1.1.0, so it's definitely available.

> OSGi declarations contain multiple import headers for javax.transaction
> -----------------------------------------------------------------------
>
>                 Key: DBCP-454
>                 URL: https://issues.apache.org/jira/browse/DBCP-454
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: OSGi
>            Reporter: Philipp Marx
>            Assignee: Matt Sicker
>            Priority: Blocker
>             Fix For: 2.2
>
>         Attachments: patch
>
>
> In DBCP-445 an issue for "javax.transaction" import-packages was addressed. Though with
the fix for this issue the import-packages will contain "javax.transaction" twice:
> Import-Package: javax.management,javax.naming,javax.naming.spi,javax.s
>  ql,javax.transaction,javax.transaction.xa,org.apache.commons.logging,
>  org.apache.commons.pool2,org.apache.commons.pool2.impl,javax.transact
>  ion.xa;version="1.1.0";partial=true;mandatory:=partial,javax.transact
>  ion;version="1.1.0"
> Thus the bundle can't be loaded as duplicate import declarations are prohibited and i.e.
Felix will complain about this and refuse to install the bundle. The fix is quite simple by
appending the '*' to the end (see attached patch).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message