How to set the orders of jars in Weblogic EAR?

拟墨画扇 提交于 2019-12-06 21:44:35

The top-level element in weblogic-application.xml has an optional classloader-structure element that you probably want to look into. For instance you can do something like:

   <classloader-structure> 
     <module-ref> 
       <module-uri>ejb1.jar</module-uri> 
     </module-ref>
     <module-ref> 
       <module-uri>web3.war</module-uri> 
     </module-ref>

     <classloader-structure> 
        <module-ref> 
           <module-uri>web1.war</module-uri> 
        </module-ref> 
     </classloader-structure>

   </classloader-structure>

Read more about declaring custom class loading at these Oracle docs. You may also find the Classloader Analysis Tool (CAT) at the same link of interest.

If you're getting ClassNotFound exceptions, try checking out the MANIFEST.MF for each of your modules to see if the "Class-Path" attribute is correctly populated with the locations of your jars in your APP-INF/lib - I've just spent a week or more tearing my hair out trying to find a solution to a similar problem, and this is what fixed it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!