If you use Maven as your build tool, you will not run in issues like this.

Gary

On Wed, Sep 1, 2021, 21:15 Gary Gregory <[email protected]> wrote:

> It is documented on
> https://commons.apache.org/proper/commons-text/dependencies.html
>
> Gary
>
> On Wed, Sep 1, 2021, 20:56 Ted Teichrieb <[email protected]>
> wrote:
>
>> Hi
>>
>>
>>
>> I am getting an error:
>>
>> Exception in thread "Timer-0" java.lang.NoClassDefFoundError:
>> org/apache/commons/lang3/Range
>>
>>                 at
>> org.apache.commons.text.translate.NumericEntityEscaper.<init>(NumericEntityEscaper.java:46)
>>
>>                 at
>> org.apache.commons.text.translate.NumericEntityEscaper.between(NumericEntityEscaper.java:85)
>>
>>                 at
>> org.apache.commons.text.StringEscapeUtils.<clinit>(StringEscapeUtils.java:162)
>>
>> …
>>
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.commons.lang3.Range
>>
>>                 at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
>>
>>                 at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
>>
>>                 ... 16 more
>>
>>
>>
>> After a lot of googling to solve what I thought was a config issue, I
>> finally checked the source code at
>> https://github.com/apache/commons-text/blob/master/src/main/java/org/apache/commons/text/StringEscapeUtils.java
>> and found that it is importing “org.apache.commons.lang3.StringUtils”.
>>
>>
>>
>> Please either:
>>
>>    - Remove the dependency on the lang 3 library
>>    - Document on the Overview page
>>    <https://commons.apache.org/proper/commons-text/index.html> that the
>>    lang 3 library is required with a link to download it.
>>
>>
>>
>> I personally would prefer that the dependency be removed.  I am not an
>> experienced Java developer, but it appears that the lang 3 library is only
>> used to indicate an empty string, which could easily be defined locally.
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Ted Teichrieb
>>
>> Bitcentral, Inc. – Sr. Software Engineer
>>
>> www.bitcentral.com
>>
>> [email protected]
>>
>>
>>
>

Reply via email to