Details
-
Type:
Task
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:3
-
Epic Link:
-
Sprint:Summer 2 2023 May 29, Summer 3 2023 June 12, Summer 4 2023 June 26
Description
Situation: This ticket is part of a series of tutorials on OSGI.
Task: Read and complete this tutorial: https://medium.com/javarevisited/learn-osgi-from-scratch-eclipse-intellij-and-wso2-platform-%EF%B8%8F-bf4c5629e097
Document how useful this tutorial was and any useful information from the tutorial in the Jira comments below.
Attachments
Issue Links
Activity
| Field | Original Value | New Value |
|---|---|---|
| Epic Link |
|
| Description |
Situation: This ticket is part of a series of tutorials on OSGI.
Task: Read and complete this tutorial: https://medium.com/javarevisited/learn-osgi-from-scratch-eclipse-intellij-and-wso2-platform-%EF%B8%8F-bf4c5629e097 |
Situation: This ticket is part of a series of tutorials on OSGI.
Task: Read and complete this tutorial: https://medium.com/javarevisited/learn-osgi-from-scratch-eclipse-intellij-and-wso2-platform-%EF%B8%8F-bf4c5629e097 Document how useful this tutorial was and any useful information from the tutorial in the Jira comments below. |
| Sprint | Summer 2 2023 May 29 [ 171 ] | Summer 2 2023 May 29, Summer 3 2023 June 12 [ 171, 172 ] |
| Rank | Ranked higher |
| Status | To-Do [ 10305 ] | In Progress [ 3 ] |
| Status | In Progress [ 3 ] | Needs 1st Level Review [ 10005 ] |
| Assignee | Kaushik Gopu [ kgopu ] | Ann Loraine [ aloraine ] |
| Status | Needs 1st Level Review [ 10005 ] | First Level Review in Progress [ 10301 ] |
| Status | First Level Review in Progress [ 10301 ] | Needs 1st Level Review [ 10005 ] |
| Assignee | Ann Loraine [ aloraine ] |
| Status | Needs 1st Level Review [ 10005 ] | First Level Review in Progress [ 10301 ] |
| Assignee | Nowlan Freese [ nfreese ] |
| Sprint | Summer 2 2023 May 29, Summer 3 2023 June 12 [ 171, 172 ] | Summer 2 2023 May 29, Summer 3 2023 June 12, Summer 4 2023 June 26 [ 171, 172, 173 ] |
| Rank | Ranked higher |
| Status | First Level Review in Progress [ 10301 ] | Needs 1st Level Review [ 10005 ] |
| Status | Needs 1st Level Review [ 10005 ] | First Level Review in Progress [ 10301 ] |
| Comment |
[ Which version of OSGi service component runtime is being used here?
I guess: v1.1.0. Is the same version as all the other OSGi framework parts and packages? Nope. From the manifest of above jar file: {code} Import-Package: org.osgi.framework;version="[1.7.0,2.0.0)",org.osgi.serv ice.component;version="[1.2.0,2.0.0)" Service-Component: OSGI-INF/org.wso2.carbon.book.provider.internal.BookP roviderServiceComponent.xml Tool: Bnd-2.1.0.20130426-122213 {code} ] |
| Comment |
[ As noted above, I built the project using "mvn install", which copies the artifacts into my local .m2 maven repository.
I then installed the karaf OSGi framework and attempted to install the bundles. However, the bundles failed to be resolved. See errors below: {code} karaf@root()> bundle:install -s mvn:org.wso2.carbon/org.wso2.carbon.book.provider/1.0-SNAPSHOT Bundle ID: 53 Error executing command: Error installing bundles: Unable to start bundle mvn:org.wso2.carbon/org.wso2.carbon.book.provider/1.0-SNAPSHOT: org.osgi.framework.BundleException: Unable to resolve org.wso2.carbon.book.provider [53](R 53.0): missing requirement [org.wso2.carbon.book.provider [53](R 53.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.2.0)(!(version>=2.0.0))) Unresolved requirements: [[org.wso2.carbon.book.provider [53](R 53.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.2.0)(!(version>=2.0.0)))] karaf@root()> bundle:install -s mvn:org.wso2.carbon/org.wso2.carbon.book.reader/1.0-SNAPSHOT Bundle ID: 54 Error executing command: Error installing bundles: Unable to start bundle mvn:org.wso2.carbon/org.wso2.carbon.book.reader/1.0-SNAPSHOT: org.osgi.framework.BundleException: Unable to resolve org.wso2.carbon.book.reader [54](R 54.0): missing requirement [org.wso2.carbon.book.reader [54](R 54.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.2.0)(!(version>=2.0.0))) Unresolved requirements: [[org.wso2.carbon.book.reader [54](R 54.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.component)(version>=1.2.0)(!(version>=2.0.0)))] karaf@root()> {code} ] |
| Comment |
[ I am using latest version of Apache karaf. Maybe I need to downgrade to a lower version of the framework.
Trying 4.0.10 which supports OSGi release 5. ] |
| Comment |
[ I could load both the reader and provider bundles after loading org.osgi.service.component, with:
{code} bundle:install -s mvn:org.osgi/org.osgi.service.component/1.5.1 {code} This bundle is mentioned in the "import packages" section of the manifest. This bundle was present in my system, in my .m2 directory. Why didn't karaf load it automatically? ] |
| Assignee | Nowlan Freese [ nfreese ] | Ann Loraine [ aloraine ] |
| Status | First Level Review in Progress [ 10301 ] | Ready for Pull Request [ 10304 ] |
| Status | Ready for Pull Request [ 10304 ] | Pull Request Submitted [ 10101 ] |
| Status | Pull Request Submitted [ 10101 ] | Reviewing Pull Request [ 10303 ] |
| Status | Reviewing Pull Request [ 10303 ] | Merged Needs Testing [ 10002 ] |
| Status | Merged Needs Testing [ 10002 ] | Post-merge Testing In Progress [ 10003 ] |
| Resolution | Done [ 10000 ] | |
| Status | Post-merge Testing In Progress [ 10003 ] | Closed [ 6 ] |
| Assignee | Ann Loraine [ aloraine ] | Kaushik Gopu [ kgopu ] |
This is one the best article for learning OSGI in terms of both theoretical and conceptual aspect. This article helped me in creation of OSGI project from scratch. The author covers two examples one is developed on eclipse IDE using MANIFEST.MF file, which is quite older, and the other one is developed on IntelliJ using MAVEN.
The second example is close to our IGB project in terms of project structure. However, the example is somewhat bigger and it might be difficult to understand in first go. So I recommend to create simple "Hello World" project to understand the basic workflow and configurations of OSGI and then comeback to this example to know how bundles interact with each other in order to deliver end result.