question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSGi data in MANIFEST.MF is incorrect in version 4.7.0

See original GitHub issue

Environment

Liquibase Version: 4.7.0

Liquibase Integration & Version: liquibase-core

Liquibase Extension(s) & Version: n/a

Database Vendor & Version: n/a

Operating System Type & Version: MacOs, openjdk 11.0.11 2021-04-20 LTS

Description

The MANIFEST.MF file inside liquibase-core-4.7.0.jar is not valid. Something around versioning seems to have gone wrong. Specifically:

Bundle-Version: 0.0.0.SNAPSHOT should be Bundle-Version: 4.7.0 Liquibase packages inside the Import-Package list have incorrect version definition. E.g. ...,liquibase.change;resolution:=optional;version="[4.7.0,1),... the version specification should be [4.7,5) and there is an issue with quotation marks as the opening quotes after version= don’t get closed. A locally compiled earlier version has this instead: `…liquibase.change;resolution:=optional;version=“[4.5,5)”,…

This means the bundle cannot be resolved. Trying do to so using bnd shows an error like this:

Resolution failed. Capabilities satisfying the following requirements could not be found:
    [<<INITIAL>>]
          ⇒ ...
              ⇒ osgi.wiring.package: (&(osgi.wiring.package=...)
                  ⇒ [... version=5.0.0.0-SNAPSHOT]
                      ⇒ osgi.wiring.package: (&(osgi.wiring.package=liquibase.database)(version>=4.7.0)(!(version>=5.0.0)))
                          ⇒ [org.liquibase.core version=0.0.0.SNAPSHOT]
                              ⇒ osgi.wiring.package: (osgi.wiring.package=1))

Steps To Reproduce

To see the contents of the file:

  • download liquibase-core-4.7.0.jar from Maven Central
  • extract/unpack files inside liquibase-core-4.7.0.jar
  • open META-INF/MANIFEST.MF

Loading the resolution issue:

  • Create an OSGi test that references liquibase.
  • Run the test

Actual Behavior

  • Bundle doesn’t resolve

Expected/Desired Behavior

  • Bundle should be resolved correctly

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
driessamyncommented, Mar 25, 2022

@driessamyn and @ktor could you check if the attached jar (renamed as a .zip for github reasons) works correctly?

We’re getting ready to release that, but my understanding of OSGi is tenuous and some additional verification would be a huge help.

Thanks!

liquibase-4.9.1-RC1.zip

I ran a test with the attached and it worked. Thanks for this, much appreciated!

I could create a standalone OSGi test that you may be able to integrate with your pipeline if you think that would be useful?

Read more comments on GitHub >

github_iconTop Results From Across the Web

511539 – API Tools creates problems for API changes ... - Bugs
I20170201-2000 API Tools creates problems for API changes on a wrong file (MANIFEST.
Read more >
OSGi bundles - IBM
Bundles are the basic building blocks of OSGi. A bundle is just a .jar file with a special manifest file (MANIFEST.MF) that describes...
Read more >
DataStax Java Driver - Frequently Asked Questions - OSGi
Frequently Asked Questions - OSGi. How to use the Java driver in an OSGi environment? We have complete examples demonstrating usage of the...
Read more >
Wrong Manifest.mf in IntelliJ IDEA created .jar - Stack Overflow
So, create it and put a file named "MANIFEST.MF" in it with the following contents: Manifest-Version: 1.0 Main-Class: <packageName>.Main.
Read more >
Chapter 9. Issues Resolved in Fuse 7.0
KARAF-1616. Upgrade to maven-release-plugin 2.3.2. KARAF-1617. Blueprint deployer in combination with maven URL deployer creates wrong OSGi/blueprint/ file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found