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

This is in continuation of Despite having commons-lang included in pom, getting exception java.lang.NoSuchMethodError:org.apache.commons.lang.StringUtils.join I have the following in weblogic-application.xml

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application>
    <prefer-application-packages>
        <package-name>commons-lang.*</package-name>
    </prefer-application-packages>
</weblogic-application>

However I am still getting

Root cause of ServletException.
java.lang.NoSuchMethodError:  org.apache.commons.lang.StringUtils.join
(Ljava/util/Collection;Ljava/lang/String;)Ljava/lang/String;

How come classloader filtering is not able to detect jar mentioned in

weblogic-application.xml
                <package-name>commons-lang.*</package-name> doesn't look like a package name. org.apache.commons.lang will probably suit better.
– Tome
                Jan 28, 2015 at 11:00

<package-name>commons-lang.*</package-name> does not look valid. commons-lang is the artifact ID of the library, not a valid package.

Replace this by something like <package-name>org.apache.commons.*</package-name> or <package-name>org.apache.commons.lang.*</package-name> and it should world correctly.

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.