[ 
https://issues.apache.org/jira/browse/LANG-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030421#comment-18030421
 ] 

Subrhamanya Hebbar edited comment on LANG-1787 at 10/16/25 5:29 PM:
--------------------------------------------------------------------

I didn't had any unit test as such. What I tried for me is

 
 * Open existing OSGI application. (I have felix gogo 0.10.0)
 * Replace commons-lang3 3.17.0 with latest version.
 * Now open it with OSGI console. When opened, run as -s INSTALLED
 * It will show commons-lang3 as INSTALLED.
 * Now run diag "bundle number for commons-lang3" it will show OSGI issue w.r.t 
Java.* packages.
 * Now close.all thse applications. Open MANIFEST file of commons-lang3 jar and 
remove Java.* lines from Import-package and rezip it and place it in OSGI 
application. Do the above step again and you will see commons-lang3 as RESOLVED 
and not INSTALLED.

 

What I am thinking is whatever is available in manifest import-package, OSGI 
application will try to look those as a separate jar rather than searching in 
jdk which makes sense which was working till 3.17.0 version


was (Author: subbu):
I didn't had any unit test as such. What I tried for me is

 
 * Open existing OSGI application. (I have felix gogo 0.10.0)
 * Replace commons-lang3 3.17.0 with latest version.
 * Now open it with OSGI console. When opened, run as -s INSTALLED
 * It will show commons-lang3 as INSTALLED.
 * Now run diag "bundle number for commons-lang3" it will show OSGI issue w.r.t 
Java.* packages.
 * Now close.all thse applications. Open MANIFEST file of commons-lang3 jar and 
remove Java.* lines from Import-package and rezip it and place it in OSGI 
application. Do the above step again and you will see commons-lang3 as RESOLVED 
and not INSTALLED.

 

What I am thinking is whatever is available in manifest import-package, OSGI 
application will try to look those as a separate jar rather than searching in 
jdk which makes sense.

> Cannot run Lang3 3.18.0 + in osgi environment
> ---------------------------------------------
>
>                 Key: LANG-1787
>                 URL: https://issues.apache.org/jira/browse/LANG-1787
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.18.0
>            Reporter: Tharindu Dharmarathna
>            Priority: Major
>
> lang3 manifest contains java related import packages.
> Due to that equinox related osgi environment not able to use this jar 
> directly as bundle.
> Import-Package: java.beans,java.io,java.lang,java.lang.annotation,java.l
>  ang.invoke,java.lang.reflect,java.math,java.net,java.nio,java.nio.chars
>  et,java.nio.file,java.security,java.text,java.time,java.time.temporal,j
>  ava.util,java.util.concurrent,java.util.concurrent.atomic,java.util.con
>  current.locks,java.util.function,java.util.regex,java.util.stream
> Include-Resource: META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=N
>  OTICE.txt
> Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
> Tool: Bnd-7.1.0.202411251545
> Multi-Release: true



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to