Details

      Description

      Situation: Unable to resolve org.slf4j.api. The manifest for slf4j-api states: Bundle-RequiredExecutionEnvironment: JavaSE-1.8
      This is for slf4j version 2.0.6 which was released in December 2022, so it may be possible that the slf4j api only works on Java 8. May be worth looking to see if there is a different artifact that will work with Java 11 but provide the same capabilities.
      See stackoverflow.

      14:49:00.373 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve org.slf4j.api [85](R 85.0): missing requirement [org.slf4j.api [85](R 85.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[org.slf4j.api [85](R 85.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))]
      
      org.osgi.framework.BundleException: Unable to resolve org.slf4j.api [85](R 85.0): missing requirement [org.slf4j.api [85](R 85.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[org.slf4j.api [85](R 85.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))]
      

      Task: Determine why this error is appearing, if it can be fixed then update this ticket as needed.

        Attachments

          Issue Links

            Activity

            Show
            nfreese Nowlan Freese added a comment - https://mvnrepository.com/artifact/org.sonatype.install4j/install4j-slf4j
            Hide
            nfreese Nowlan Freese added a comment - - edited

            The error for org.slf4j.api stated there was a missing requirement for osgi.serviceloader.processor. According to this post on stackoverflow, a number of dependencies are required, including aries spi fly. After adding the required dependencies in this commit, slf4j is able to load. However, there are other bundles that use slf4j that require a version <2, causing their bundles to fail to load.

            Reading through the slf4j faq, it doesn't seem like there is any reason for us to upgrade to >2. According to the slf4j requirements, slf4j version 1.7 works with jdk 1.5 or later (i.e. it should work with 11). Downgrading slf4j from version 2.0.7 to 1.7.36 (released Feb, 2022) and logback core/classic to 1.2.12 (released March 2023) in this commit resolves all of the slf4j errors. I have reverted the commit with the dependencies necessary for slf4j version > 2 so that the code changes are still part of the commit history, in the event that we decide to upgrade in the future.

            To test:

            1. Pull the latest changes to branch IGBF-3275 and build (mvn clean install) IGB.
            2. Check that there are no errors regarding slf4j.
            Show
            nfreese Nowlan Freese added a comment - - edited The error for org.slf4j.api stated there was a missing requirement for osgi.serviceloader.processor. According to this post on stackoverflow , a number of dependencies are required, including aries spi fly . After adding the required dependencies in this commit , slf4j is able to load. However, there are other bundles that use slf4j that require a version <2, causing their bundles to fail to load. Reading through the slf4j faq , it doesn't seem like there is any reason for us to upgrade to >2. According to the slf4j requirements , slf4j version 1.7 works with jdk 1.5 or later (i.e. it should work with 11). Downgrading slf4j from version 2.0.7 to 1.7.36 (released Feb, 2022) and logback core/classic to 1.2.12 (released March 2023) in this commit resolves all of the slf4j errors. I have reverted the commit with the dependencies necessary for slf4j version > 2 so that the code changes are still part of the commit history, in the event that we decide to upgrade in the future. To test: Pull the latest changes to branch IGBF-3275 and build (mvn clean install) IGB. Check that there are no errors regarding slf4j.
            Hide
            ann.loraine Ann Loraine added a comment -

            Update master branch (IGB for JDK 8):

            • slf4j to 1.7.36
            • logback core and logback classic to 1.2.12
            Show
            ann.loraine Ann Loraine added a comment - Update master branch (IGB for JDK 8): slf4j to 1.7.36 logback core and logback classic to 1.2.12
            Hide
            nfreese Nowlan Freese added a comment -

            Java8:
            Commit updating slf4j-api and logback-core and logback-classic: https://bitbucket.org/nfreese/nowlanfork-igb/commits/fdb32433768301579942db6565bb5f06dffbdba8

            To test:

            1. Download installer for IGBF-3311 branch: https://bitbucket.org/nfreese/nowlanfork-igb/downloads/
            2. Install and run IGB, looking for changes to log.
            Show
            nfreese Nowlan Freese added a comment - Java8: Commit updating slf4j-api and logback-core and logback-classic: https://bitbucket.org/nfreese/nowlanfork-igb/commits/fdb32433768301579942db6565bb5f06dffbdba8 To test: Download installer for IGBF-3311 branch: https://bitbucket.org/nfreese/nowlanfork-igb/downloads/ Install and run IGB, looking for changes to log.
            Hide
            ann.loraine Ann Loraine added a comment -

            Downloaded and install IGB. No differences in logging detected. Moving to "ready for PR" to add these new changes to the JDK8 branch "master"

            Show
            ann.loraine Ann Loraine added a comment - Downloaded and install IGB. No differences in logging detected. Moving to "ready for PR" to add these new changes to the JDK8 branch "master"
            Show
            nfreese Nowlan Freese added a comment - Pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/926
            Hide
            ann.loraine Ann Loraine added a comment -

            Master branch installers are built and deployed to the downloads section of the team repository.
            Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Master branch installers are built and deployed to the downloads section of the team repository. Ready for testing.

              People

              • Assignee:
                nfreese Nowlan Freese
                Reporter:
                nfreese Nowlan Freese
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: