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 Tue, 02 Aug 2016 21:01:20 GMT

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

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

Log4j doesn't require any dependencies, but dbcp does, so it makes it a lot more complicated
than the AbstractLoadBundleTest from Log4j. I figured pax-exam would provide the capability
of adding all those dependencies for me, but then I got other errors instead that are unrelated
to dbcp or osgi. [Here's a related test|https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-itest/src/test/java/org/ops4j/pax/jdbc/test/pool/PoolDbcp2Test.java]
that would fail if dbcp itself was exporting the wrong headers (as with this bug). The thing
is with pax projects is that these types of tests are run in a separate maven module, presumably
to prevent the issues I was having, and that would require a restructuring of dbcp which is
rather complicated.

> 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