Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3308

Investigate org.apache.felix.scr error

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Situation: Currently unable to resolve org.apache.felix.scr. Note that the only other bundle affected by org.apache.felix.scr is the graphTab bundle. Both bundles state that they are missing the required org.osgi.service.component.

      14:49:00.346 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve org.apache.felix.scr [64](R 64.0): missing requirement [org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0))) Unresolved requirements: [[org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0)))]
      

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

        Attachments

          Issue Links

            Activity

            nfreese Nowlan Freese created issue -
            nfreese Nowlan Freese made changes -
            Field Original Value New Value
            Epic Link IGBF-3142 [ 21688 ]
            nfreese Nowlan Freese made changes -
            Link This issue relates to IGBF-3275 [ IGBF-3275 ]
            nfreese Nowlan Freese made changes -
            Description Situation: Currently unable to resolve org.apache.felix.scr. Note that the only other bundle affected by org.apache.felix.scr is the graphTab bundle. Both bundles state that they are missing the required org.osgi.service.component.

            {code}
            14:49:00.346 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve org.apache.felix.scr [64](R 64.0): missing requirement [org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0))) Unresolved requirements: [[org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0)))]
            {code}
            Situation: Currently unable to resolve org.apache.felix.scr. Note that the only other bundle affected by org.apache.felix.scr is the graphTab bundle. Both bundles state that they are missing the required org.osgi.service.component.

            {code}
            14:49:00.346 [main] ERROR com.affymetrix.main.OSGiHandler - Unable to resolve org.apache.felix.scr [64](R 64.0): missing requirement [org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0))) Unresolved requirements: [[org.apache.felix.scr [64](R 64.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.5.0)(!(version>=1.6.0)))]
            {code}

            Task: Determine why this error is appearing, if it can be fixed then update this ticket as needed.
            nfreese Nowlan Freese made changes -
            Sprint Spring 8 2023 Apr 24 [ 168 ] Spring 9 2023 May 8 [ 169 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked lower
            nfreese Nowlan Freese made changes -
            Sprint Spring 9 2023 May 8 [ 169 ] Spring 8 2023 Apr 24 [ 168 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked lower
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ]
            nfreese Nowlan Freese made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Hide
            nfreese Nowlan Freese added a comment -

            This stackoverflow seems pertinent: https://stackoverflow.com/questions/54020799/apache-felix-osgi-error-missing-requirement-osgi-extender

            However, adding the artifact for org.osgi.service.component into the pom does not resolve the issue.

            Show
            nfreese Nowlan Freese added a comment - This stackoverflow seems pertinent: https://stackoverflow.com/questions/54020799/apache-felix-osgi-error-missing-requirement-osgi-extender However, adding the artifact for org.osgi.service.component into the pom does not resolve the issue.
            Hide
            nfreese Nowlan Freese added a comment - - edited

            https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/maven-error-in-moving-code-from-java-8-to-11-in-aem-6-5/m-p/404177/thread-id/5205

            https://stackoverflow.com/questions/53086179/maven-src-plugin-java-11-unable-to-scan-class-files

            Quote from Tim Ward:

            By moving to Java 11 the class files you create will be compiled to Java 11 byte code. The maven-scr-plugin then has to scan this byte code to find the annotations that are applied to it. Unless you can find a version of the maven-scr-plugin that supports Java 11 byte code (I'm not aware of one) then you will need to find an alternative for creating your Declarative Services metadata.

            One option would be to start using the bnd-maven-plugin or maven-bundle-plugin and the standard Declarative Services annotations instead of the Custom Felix annotations. Note that this would still involve updating those plugins to versions which can support Java 11. I believe that the bnd-maven-plugin version 4.1.0 should work properly with Java 11...

            Show
            nfreese Nowlan Freese added a comment - - edited https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/maven-error-in-moving-code-from-java-8-to-11-in-aem-6-5/m-p/404177/thread-id/5205 https://stackoverflow.com/questions/53086179/maven-src-plugin-java-11-unable-to-scan-class-files Quote from Tim Ward: By moving to Java 11 the class files you create will be compiled to Java 11 byte code. The maven-scr-plugin then has to scan this byte code to find the annotations that are applied to it. Unless you can find a version of the maven-scr-plugin that supports Java 11 byte code (I'm not aware of one) then you will need to find an alternative for creating your Declarative Services metadata. One option would be to start using the bnd-maven-plugin or maven-bundle-plugin and the standard Declarative Services annotations instead of the Custom Felix annotations. Note that this would still involve updating those plugins to versions which can support Java 11. I believe that the bnd-maven-plugin version 4.1.0 should work properly with Java 11...
            Hide
            nfreese Nowlan Freese added a comment -

            Manifest from org.apache.felix.scr:

            Manifest-Version: 1.0
            Bnd-LastModified: 1665125416475
            Build-Jdk: 11.0.12
            Built-By: jbonofre
            Bundle-Activator: org.apache.felix.scr.impl.Activator
            Bundle-Category: osgi
            Bundle-Description: Implementation of the Declarative Services specifi
             cation 1.5
            Bundle-DocURL: http://felix.apache.org/site/apache-felix-service-compo
             nent-runtime.html
            Bundle-License: https://www.apache.org/licenses/LICENSE-2.0.txt
            Bundle-ManifestVersion: 2
            Bundle-Name: Apache Felix Declarative Services
            Bundle-SymbolicName: org.apache.felix.scr
            Bundle-Vendor: The Apache Software Foundation
            Bundle-Version: 2.2.4
            Created-By: Apache Maven Bundle Plugin
            DynamicImport-Package: org.osgi.service.cm;version="[1.6,2)", org.osgi
             .service.log;version="[1.4,2)", org.osgi.service.metatype;version="[1
             .1,2)"
            Export-Package: org.apache.felix.scr.component;version="1.1.0";uses:="
             org.osgi.service.component",org.apache.felix.scr.info;version="1.0.0"
            Import-Package: org.osgi.service.cm;version="[1.6,2)";resolution:=opti
             onal,org.osgi.service.log;version="[1.4,2)";resolution:=optional,org.
             osgi.service.metatype;version="[1.2,2)";resolution:=optional,org.apac
             he.felix.service.command;resolution:=optional;version="[1.0,2)",javax
             .xml.parsers,org.apache.felix.scr.component;version="[1.1,1.2)",org.a
             pache.felix.scr.info;version="[1.0,1.1)",org.osgi.dto;version="[1.1,2
             )",org.osgi.framework;version="[1.10,2)",org.osgi.framework.dto;versi
             on="[1.8,2)",org.osgi.framework.startlevel;version="[1.0,2)",org.osgi
             .framework.wiring;version="[1.2,2)",org.osgi.resource;version="[1.0,2
             )",org.osgi.service.component;version="[1.5,1.6)",org.osgi.service.co
             mponent.runtime;version="[1.5,1.6)",org.osgi.service.component.runtim
             e.dto;version="[1.5,2)",org.osgi.util.promise;version="[1.0,2)",org.o
             sgi.util.tracker;version="[1.5,2)",org.xml.sax,org.xml.sax.helpers
            Provide-Capability: osgi.extender;osgi.extender="osgi.component";uses:
             ="org.osgi.service.component";version:Version="1.5",osgi.service;obje
             ctClass:List<String>="org.osgi.service.component.runtime.ServiceCompo
             nentRuntime";uses:="org.osgi.service.component.runtime"
            Require-Capability: osgi.ee;filter:="(|(&(osgi.ee=JavaSE)(version=1.7)
             )(&(osgi.ee=JavaSE/compact1)(version=1.8)))"
            Tool: Bnd-3.2.0.201605172007
            
            
            Show
            nfreese Nowlan Freese added a comment - Manifest from org.apache.felix.scr: Manifest-Version: 1.0 Bnd-LastModified: 1665125416475 Build-Jdk: 11.0.12 Built-By: jbonofre Bundle-Activator: org.apache.felix.scr.impl.Activator Bundle-Category: osgi Bundle-Description: Implementation of the Declarative Services specifi cation 1.5 Bundle-DocURL: http: //felix.apache.org/site/apache-felix-service-compo nent-runtime.html Bundle-License: https: //www.apache.org/licenses/LICENSE-2.0.txt Bundle-ManifestVersion: 2 Bundle-Name: Apache Felix Declarative Services Bundle-SymbolicName: org.apache.felix.scr Bundle-Vendor: The Apache Software Foundation Bundle-Version: 2.2.4 Created-By: Apache Maven Bundle Plugin DynamicImport-Package: org.osgi.service.cm;version= "[1.6,2)" , org.osgi .service.log;version= "[1.4,2)" , org.osgi.service.metatype;version="[1 .1,2)" Export-Package: org.apache.felix.scr.component;version= "1.1.0" ;uses:=" org.osgi.service.component ",org.apache.felix.scr.info;version=" 1.0.0" Import-Package: org.osgi.service.cm;version= "[1.6,2)" ;resolution:=opti onal,org.osgi.service.log;version= "[1.4,2)" ;resolution:=optional,org. osgi.service.metatype;version= "[1.2,2)" ;resolution:=optional,org.apac he.felix.service.command;resolution:=optional;version= "[1.0,2)" ,javax .xml.parsers,org.apache.felix.scr.component;version= "[1.1,1.2)" ,org.a pache.felix.scr.info;version= "[1.0,1.1)" ,org.osgi.dto;version="[1.1,2 ) ",org.osgi.framework;version=" [1.10,2)",org.osgi.framework.dto;versi on= "[1.8,2)" ,org.osgi.framework.startlevel;version= "[1.0,2)" ,org.osgi .framework.wiring;version= "[1.2,2)" ,org.osgi.resource;version="[1.0,2 ) ",org.osgi.service.component;version=" [1.5,1.6)",org.osgi.service.co mponent.runtime;version= "[1.5,1.6)" ,org.osgi.service.component.runtim e.dto;version= "[1.5,2)" ,org.osgi.util.promise;version= "[1.0,2)" ,org.o sgi.util.tracker;version= "[1.5,2)" ,org.xml.sax,org.xml.sax.helpers Provide-Capability: osgi.extender;osgi.extender= "osgi.component" ;uses: = "org.osgi.service.component" ;version:Version= "1.5" ,osgi.service;obje ctClass:List< String >="org.osgi.service.component.runtime.ServiceCompo nentRuntime ";uses:=" org.osgi.service.component.runtime" Require-Capability: osgi.ee;filter:="(|(&(osgi.ee=JavaSE)(version=1.7) )(&(osgi.ee=JavaSE/compact1)(version=1.8)))" Tool: Bnd-3.2.0.201605172007
            nfreese Nowlan Freese made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ]
            nfreese Nowlan Freese made changes -
            Sprint Spring 8 2023 Apr 24 [ 168 ] Spring 9 2023 May 8 [ 169 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked higher
            nfreese Nowlan Freese made changes -
            Sprint Spring 9 2023 May 8 [ 169 ] Spring 8 2023 Apr 24 [ 168 ]
            nfreese Nowlan Freese made changes -
            Rank Ranked lower
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ]
            nfreese Nowlan Freese made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Show
            nfreese Nowlan Freese added a comment - Some additional dependencies were required for felix.scr Commit: https://bitbucket.org/nfreese/nowlanfork-igb/commits/03e56ddfd58abf6f7c6f774805cbc6d5f2cb6473 Stackoverflow: https://stackoverflow.com/questions/46493613/what-is-the-replacement-for-javax-activation-package-in-java-9
            Hide
            nfreese Nowlan Freese added a comment -

            To test:

            1. Download the latest changes to IGBF-3275 branch.
            2. Build IGB (mvn clean install)
            3. Look to see that the felix.scr bundle is started and that there are no errors related to org.apache.felix.scr
            Show
            nfreese Nowlan Freese added a comment - To test: Download the latest changes to IGBF-3275 branch. Build IGB (mvn clean install) Look to see that the felix.scr bundle is started and that there are no errors related to org.apache.felix.scr
            nfreese Nowlan Freese made changes -
            Assignee Nowlan Freese [ nfreese ]
            nfreese Nowlan Freese made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            nfreese Nowlan Freese made changes -
            Story Points 2 1
            ann.loraine Ann Loraine made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Ran IGB with:

            java -jar igb_exe.jar > ~/Desktop/run_igb.out
            

            Reviewed run_igb.out and observed:

            10:43:08.890 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.http.servlet-api
            10:43:08.891 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.scr
            10:43:08.911 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.webconsole
            

            indicating the bundle has started.

            Show
            ann.loraine Ann Loraine added a comment - Ran IGB with: java -jar igb_exe.jar > ~/Desktop/run_igb.out Reviewed run_igb.out and observed: 10:43:08.890 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.http.servlet-api 10:43:08.891 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.scr 10:43:08.911 [main] INFO com.affymetrix.main.OSGiHandler - Starting Bundle: org.apache.felix.webconsole indicating the bundle has started.
            ann.loraine Ann Loraine made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            ann.loraine Ann Loraine made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ] Nowlan Freese [ nfreese ]

              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: