[
https://issues.apache.org/jira/browse/LANG-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030529#comment-18030529
]
Subrhamanya Hebbar edited comment on LANG-1787 at 10/17/25 4:03 AM:
--------------------------------------------------------------------
Hmm I understood. We use eclipse equinox osgi console along with felix gogo.
I am attaching a jar here to recreate the issue [^OSGI_TESTING.zip]
Steps to recreate the issue:
* Extract the content of the zip and run the below commands
* *cd OSGI_TESTING/OSGI_TESTING*
* *java -jar .\org.eclipse.osgi-3.10.0.v20140606-1445.jar -consol*
* *ss -s*
* you will see. commons-lang3 is not seen here at all
!image-2025-10-17-09-03-35-874.png|width=130,height=53!
* *cd configuration* !image-2025-10-17-09-05-34-093.png|width=123,height=75!
* you will see random numbered file name. open the lastest created one. you
will see the log as !image-2025-10-17-09-07-08-050.png|width=274,height=109!
* Now close your command prompt or shell.
* delete that random numbered log file and other folders created, from
configuration (make sure to not delete config file though) folder. ie
!image-2025-10-17-09-09-15-315.png|width=251,height=101!
* Now come back 1 step from configuration folder you will see all the
different jars there !image-2025-10-17-09-11-12-169.png|width=259,height=169!
* Now open commons-lang3 jar, go to META-INF and open MANIFEST.MF file. Edit
its import-package so that it doesn't have any java jdk internal libraries in
it. This results in totally removing import-package.
* Specifically, this piece
!image-2025-10-17-09-16-47-114.png|width=229,height=228!
* Now replace the MANIFEST.MF file from commons-lang3 jar with this modified
MANIFEST.MF file.
* Now run *java -jar .\org.eclipse.osgi-3.10.0.v20140606-1445.jar -console*
* *ss -s*
* Now you will see commons-lang3 in RESOLVED state
!image-2025-10-17-09-21-29-043.png|width=383,height=125!
* Compare the previous and this screenshot. Now we can see commons-lang3,
previously we didn't see that.
* Now do *cd configuration*
* Open the latest random numbered file. You don't see any errors related to
commons-lang3 !image-2025-10-17-09-24-25-832.png|width=378,height=166!
The issue is successfully recreated and resolved too.
was (Author: subbu):
Hmm I understood. We use eclipse equinox osgi console along with felix gogo.
I am attaching a jar here to recreate the issue [^OSGI_TESTING.zip]
Steps to recreate the issue:
* Extract the content of the zip and run the below commands
* *cd OSGI_TESTING/OSGI_TESTING*
* *java -jar .\org.eclipse.osgi-3.10.0.v20140606-1445.jar -consol*
* *ss -s*
* you will see. commons-lang3 is not seen here at all
!image-2025-10-17-09-03-35-874.png|width=130,height=53!
* *cd configuration* !image-2025-10-17-09-05-34-093.png|width=123,height=75!
* you will see random numbered file name. open the lastest created one. you
will see the log as !image-2025-10-17-09-07-08-050.png|width=274,height=109!
* Now close your command prompt or shell.
* delete that random numbered log file and other folders created, from
configuration folder. ie
!image-2025-10-17-09-09-15-315.png|width=251,height=101!
* Now run come back 1 step from configuration folder you will see all the
different jars there !image-2025-10-17-09-11-12-169.png|width=259,height=169!
* Now open commons-lang3 jar, go to META-INF and open MANIFEST.MF file. Edit
its import-package so that it doesn't have any java jdk internal libraries in
it. This results in totally removing import-package.
* Specifically, this piece
!image-2025-10-17-09-16-47-114.png|width=229,height=228!
* Now replace the MANIFEST.MF file from commons-lang3 jar with this modified
MANIFEST.MF file.
* Now run *java -jar .\org.eclipse.osgi-3.10.0.v20140606-1445.jar -console*
* *ss -s*
* Now you will see commons-lang3 in RESOLVED state
!image-2025-10-17-09-21-29-043.png|width=383,height=125!
* Compare the previous and this screenshot. Now we can see commons-lang3,
previously we didn't see that.
* Now do *cd configuration*
* Open the latest random numbered file. You don't see any errors related to
commons-lang3 !image-2025-10-17-09-24-25-832.png|width=378,height=166!
The issue is successfully recreated and resolved too.
> 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
> Attachments: OSGI_TESTING.zip, image-2025-10-17-09-03-35-874.png,
> image-2025-10-17-09-05-34-093.png, image-2025-10-17-09-07-08-050.png,
> image-2025-10-17-09-09-15-315.png, image-2025-10-17-09-11-12-169.png,
> image-2025-10-17-09-16-47-114.png, image-2025-10-17-09-21-29-043.png,
> image-2025-10-17-09-24-25-832.png
>
>
> 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)