Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams One or more libraries references to the old version. Use an IDE like Eclipse to check the dependencies of other libraries. Reporter Aug 24, 2018 at 13:26 @reporter Can you tell me in Eclipse how to check the dependencies of other libraries? Is there such a way, which would tell us missed libs? JavaLover Aug 27, 2018 at 5:16

The base package of Apache Commons Lang 3 is not org.apache.commons.lang anymore.

Provided that the error occurs in your own code, you have to replace it with the org.apache.commons.lang3 package .

If it occurs in external libraries, either upgrade them to a version that uses Lang 3 (if it is possible), or you may have to also keep your older commons lang among the dependencies (as explained in the answer by Karol, the distinct packages will prevent possible conflicts anyway).

e.g :

org.apache.commons.lang.StringUtils in Lang 2.6

org.apache.commons.lang3.StringUtils in Lang 3

commons-lang3 is using org.apache.commons.lang3 base package to avoid conflicts with previous versions of commons-lang . This allows both 2.X and 3.X to be used at the same time.

To update to 3.X uou have to change the import in your code e.g. use

import org.apache.commons.lang3.StringUtils;
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.