Weblogic 10.3.1.0 is using com.bea.core.apache.commons.net_1.0.0.0_1-4-1.jar… I want to use commons-net-2.0.jar from my code

后端 未结 2 1747
南笙
南笙 2020-12-03 12:15

Weblogic 10.3.1.0 is using com.bea.core.apache.commons.net_1.0.0.0_1-4-1.jar... I want to use commons-net-2.0.jar from my code.

How can I force it to use the newer

2条回答
  •  鱼传尺愫
    2020-12-03 12:54

    Have you tried putting the required JAR in \WEB-INF\lib of the WAR, \APP-INF\lib of the EAR or the \lib directory of the EAR file?

    If your project is a standalone web project (with no EJBs), placing the JAR in WEB-INF\lib should be sufficient. For enterprise applications that possibly have EJB modules and Web modules bundled in a EAR file, APP-INF\lib should work, although I'm not so sure about WebLogic Server's support for the library directory (usually a \lib directory in the EAR file, but sometimes configurable via application.xml) concept brought out in Java EE 5.

    EDIT: In the scenario where the application server's library is loaded ahead of the one present in the application, WebLogic Server's feature of filtered classloaders will aid in ensuring that the application always has the right classes loaded from its classpath, instead of the server's classpath.

提交回复
热议问题