Bug 52318 - Version in tomcat-jdbc POM is conflicted with Version in MANIFEST for JULI JAR
Version in tomcat-jdbc POM is conflicted with Version in MANIFEST for JULI JAR
Status: RESOLVED FIXED
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool
unspecified
All All
: P2 critical (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
: 52429 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-12-11 19:49 UTC by pan4o
Modified: 2013-03-14 20:15 UTC (History)
1 user (show)



Attachments
Updated dependency on Juli, allow versions 7.0.x (897 bytes, text/plain)
2013-01-28 11:00 UTC, Martin Lichtin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pan4o 2011-12-11 19:49:02 UTC
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>7.0.22</version>

has dependenca to apache-juli

MANIFEST:
org.apache.juli.logging;version="[6.0.18, 7.0.0)"

BUT in POM:
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-juli</artifactId>
      <version>7.0.22</version>
      <scope>compile</scope>
    </dependency>

WHY????????
Comment 1 Mark Thomas 2011-12-12 23:06:53 UTC
Correcting component
Comment 2 pan4o 2012-01-05 12:15:13 UTC
Bug or not a bug?
Comment 3 Pid 2012-01-08 21:55:56 UTC
*** Bug 52429 has been marked as a duplicate of this bug. ***
Comment 4 Filip Hanik 2012-03-20 17:10:29 UTC
this 
MANIFEST:
org.apache.juli.logging;version="[6.0.18, 7.0.0)"

would indicate that the component can use juli versions from 6.0.18 and up, as well as 7.0.0 and up. not being that familiar with OSGi, what's the issue here? submit a patch
Comment 5 Konstantin Kolinko 2012-03-20 17:38:03 UTC
(In reply to comment #4)
> this 
> MANIFEST:
> org.apache.juli.logging;version="[6.0.18, 7.0.0)"
> 
> would indicate that the component can use juli versions from 6.0.18 and up, as
> well as 7.0.0 and up. not being that familiar with OSGi, what's the issue here?
> submit a patch

From my math knowledge I would read the above range as "not including 7.0.0".  That is 6.9.99 is OK, but 7.0.0 is not.

As some stackoverflow answer hinted, the version ranges are documented "in section 3.2.6 of the OSGi Core Specification."

I think you just mean ">= 6.0.18" here.  From section 3.2.6 it reads that such a range is written just as "6.0.18".  (In Apache Ivy I would write "[6.0.18,)", but it is not a valid syntax in OSGi).
Comment 6 pan4o 2012-03-22 12:46:20 UTC
[6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not including versions under 6.0.18 or above 7.0.0.

To fix this issue, you have to change the MANIFEST:

MANIFEST:
org.apache.juli.logging;version="[7.0.0, 7.1.0)"

OR

org.apache.juli.logging;version="[7.0.0, 8.0.0)"

Please refet to my last post in Bug 52381

Regards
Pancho
Comment 7 Filip Hanik 2012-03-27 14:41:40 UTC
(In reply to comment #6)
> [6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not
> including versions under 6.0.18 or above 7.0.0.
> 
> To fix this issue, you have to change the MANIFEST:
> 
> MANIFEST:
> org.apache.juli.logging;version="[7.0.0, 7.1.0)"
> 
> OR
> 
> org.apache.juli.logging;version="[7.0.0, 8.0.0)"
> 
> Please refet to my last post in Bug 52381
> 
> Regards
> Pancho

aren't you excluding version 6.0.18+ here?
Comment 8 pan4o 2012-03-27 19:20:09 UTC
(In reply to comment #7)

Yes, because ... tomcat-jdbc in the version 7.0.22 has a dependency in the pom file to tomcat-juli in the version 7.0.22 ... soo

MANIFEST:
Import-Package: org.apache.juli.logging;version="[7.0.0, 7.1.0)"


> (In reply to comment #6)
> > [6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not
> > including versions under 6.0.18 or above 7.0.0.
> > 
> > To fix this issue, you have to change the MANIFEST:
> > 
> > MANIFEST:
> > org.apache.juli.logging;version="[7.0.0, 7.1.0)"
> > 
> > OR
> > 
> > org.apache.juli.logging;version="[7.0.0, 8.0.0)"
> > 
> > Please refet to my last post in Bug 52381
> > 
> > Regards
> > Pancho
> 
> aren't you excluding version 6.0.18+ here?
Comment 9 Filip Hanik 2012-03-28 15:34:18 UTC
(In reply to comment #8)
> (In reply to comment #7)
> 
> Yes, because ... tomcat-jdbc in the version 7.0.22 has a dependency in the pom
> file to tomcat-juli in the version 7.0.22 ... soo
> 
> MANIFEST:
> Import-Package: org.apache.juli.logging;version="[7.0.0, 7.1.0)"
> 
> 
> > (In reply to comment #6)
> > > [6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not
> > > including versions under 6.0.18 or above 7.0.0.
> > > 
> > > To fix this issue, you have to change the MANIFEST:
> > > 
> > > MANIFEST:
> > > org.apache.juli.logging;version="[7.0.0, 7.1.0)"
> > > 
> > > OR
> > > 
> > > org.apache.juli.logging;version="[7.0.0, 8.0.0)"
> > > 
> > > Please refet to my last post in Bug 52381
> > > 
> > > Regards
> > > Pancho
> > 
> > aren't you excluding version 6.0.18+ here?

what's in the POM is not really related to what should be in an OSGI manifest though. Nothing should prevent you from dropping this library into a container running Tomcat 6
Comment 10 pan4o 2012-03-28 18:07:02 UTC
> 
> what's in the POM is not really related to what should be in an OSGI manifest
> though. Nothing should prevent you from dropping this library into a container
> running Tomcat 6

Of course it is to 100% related in an OSGI container, like Karaf! 
If you need version 7 of library A to run version 7 of library B.
And ... is Apache Tomcat an OSGI container? I think no. So the imports and the exports in the MANIFEST are only relevant in an OSGI continer, but they must be the same like these in the pom file or in the build.xml.
You can not build with version 7 and want to run with version 6 .. or?
Comment 11 Filip Hanik 2012-03-28 19:10:09 UTC
yes, the jdbc-pool library can be built on tomcat 7 and you can drop that into a Tomcat 6 container, and it will work just fine against the tomcat 6 juli library
Comment 12 pan4o 2012-03-29 06:33:10 UTC
Ok, i undestand ... i am not that familiar with the build and run dependencies of the tomcat libraries.
Please correct me if i am wrong:
tomcat-jdbc in the version 7.0.22 can/should run with tomcat-juli in the version 6.0.18 but has a compile dependency to tomcat-juli in the version 7.0.22.

The fix of this issue will be than:
tomcat-jdbc MANIFEST:
Import-Package: org.apache.juli.logging;version="[6.0, 7.1)"
OR may be
Import-Package: org.apache.juli.logging;version="[6.0, 8.0)"

But be careful with that version range. This means tomcat-jdbc can run with all versions in [6.0.0, 7.1.0) of tomcat-juli.
Comment 13 Filip Hanik 2012-03-29 16:21:19 UTC
.22.
> 
> The fix of this issue will be than:
> tomcat-jdbc MANIFEST:
> Import-Package: org.apache.juli.logging;version="[6.0, 7.1)"
> OR may be
> Import-Package: org.apache.juli.logging;version="[6.0, 8.0)"
> 
> But be careful with that version range. This means tomcat-jdbc can run with all
> versions in [6.0.0, 7.1.0) of tomcat-juli.

and that is correct. it can run with all versions of 6.
so, can we get a patch or correct manifest, attached to this bug, and then we can get that taken care of
Comment 14 pan4o 2012-03-30 06:31:58 UTC
(In reply to comment #13)
> .22.
> > 
> > The fix of this issue will be than:
> > tomcat-jdbc MANIFEST:
> > Import-Package: org.apache.juli.logging;version="[6.0, 7.1)"
> > OR may be
> > Import-Package: org.apache.juli.logging;version="[6.0, 8.0)"
> > 
> > But be careful with that version range. This means tomcat-jdbc can run with all
> > versions in [6.0.0, 7.1.0) of tomcat-juli.
> 
> and that is correct. it can run with all versions of 6.
> so, can we get a patch or correct manifest, attached to this bug, and then we
> can get that taken care of

Hi Filip,
how are you building your manifest files? I hope automatically? It´s enough to change the version range of tomcat-juli in the tomcat-jdbc MANIFEST.

The problem is if I provide you a static correct tomcat-jdbc MANIFEST file for the version 7.0.22 ... perhaps it is not compatible with another versions of tomcat-jdbc ... should I?
Comment 15 pan4o 2012-04-02 06:20:57 UTC
Hi,
i recommend reading this whitepaper to understand the versioning in OSGI:
http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf
Comment 16 Filip Hanik 2012-08-10 20:28:17 UTC
Requested correct manifest was not provided. Closing bug.
Comment 17 Martin Lichtin 2013-01-28 11:00:29 UTC
Created attachment 29897 [details]
Updated dependency on Juli, allow versions 7.0.x

Could this be fixed?
I would like to use tomcat-jdbc in an OSGi environment and currently the
version restriction [6.0.18, 7.1.0) on juli.logging forces me to install
a version 6 of tomcat-juli.
Comment 18 Martin Lichtin 2013-01-28 15:20:18 UTC
Just realize there is another problem when trying to use tomcat-jdbc under OSGi:
Juli is not a bundle. 
So the version restriction in tomcat-jdbc's MANIFEST does not really make sense,
as Juli does not export its packages with a version.
Comment 19 Konstantin Kolinko 2013-03-14 03:56:23 UTC
Original issue should have been fixed by r1455973, r1456080

Issue in comment 18 still remains.
Comment 20 Violeta Georgieva 2013-03-14 07:50:13 UTC
(In reply to comment #19)
> Original issue should have been fixed by r1455973, r1456080

Fixed in trunk and 7.0.x and will be included in 7.0.39 onwards.

> Issue in comment 18 still remains.

There is another bug report for this issue - 52381.

I'm proposing to close this one.