You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2025/09/08 00:52:00 UTC

[jira] [Comment Edited] (LANG-1785) IllegalAccessError when running in JNLP context

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

Gary D. Gregory edited comment on LANG-1785 at 9/8/25 12:51 AM:
----------------------------------------------------------------

Hello [~jansohn]

This might be because the version of Commons Lang you are using is not in sync with OpenWebStart.

The git master OpenWebStart uses Lang 3.16.0

Your app uses 3.18.0

You can run
{noformat}
mvn dependency:tree
{noformat}

From the root of the OpenWebStart git repository to see the version in use.

You can try building OpenWebStart locally with an updated version of Lang or use the old version of Lang in your app.



was (Author: garydgregory):
Hello [~jansohn]

This might be because the version of Commons Lang you are using is not in sync with OpenWebStart.

The git master OpenWebStart uses Lang 3.16.0

Your app uses 3.18.0

You can run
{noformat}
mvn dependency:tree
{noformat}

From the root of OpenWebStart to see the version in use.

You can try building OpenWebStart locally with an updated version of Lang or use the old version of Lang in your app.


> IllegalAccessError when running in JNLP context
> -----------------------------------------------
>
>                 Key: LANG-1785
>                 URL: https://issues.apache.org/jira/browse/LANG-1785
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.18.0
>            Reporter: Robin Jansohn
>            Priority: Major
>
> I'm getting the following exception when running my OpenJFX application with the latest lang3 version in a JNLP context (IcedTea-Web):
> {noformat}
> Caused by: java.lang.IllegalAccessError: class org.apache.commons.lang3.Strings tried to access method 'boolean org.apache.commons.lang3.CharSequenceUtils.regionMatches(java.lang.CharSequence, boolean, int, java.lang.CharSequence, int, int)' (org.apache.commons.lang3.Strings is in unnamed module of loader net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader @4bd10202; org.apache.commons.lang3.CharSequenceUtils is in unnamed module of loader 'bootstrap')
> 	at org.apache.commons.lang3.Strings.endsWith(Strings.java:606)
> 	at org.apache.commons.lang3.Strings.removeEnd(Strings.java:1142)
> {noformat}
> Anyone seen something like this before?
> This only occurs if I use the new {{Strings.CS.removeEnd(...)}} but not with the deprecated {{StringUtils.removeEnd(...)}}.
> I can workaround the issue so it is not a huge deal. Still would be interesting to know if someone could explain what is causing this and if there is something which should get fixed here...



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