当前位置: 代码迷 >> Web前端 >> How can I force WebLogic to use third party jars that are included in my Ear
  详细解决方案

How can I force WebLogic to use third party jars that are included in my Ear

热度:702   发布时间:2012-11-12 12:31:58.0
How can I force WebLogic to use third party jars that are included in my Ear?

Normally, if a third party component is included in the WebLogic server implementation, that version of the package is picked up because of the standard J2EE classloading model. It is possible with WebLogic to specify packages that should be used from the ear. The filtering classloader mechanism is provided for this purpose. This involves creating a weblogic-application.xml file and specifying the packages that must be filtered. See this link for details on how to use this: filtering classloader. Most applications include the following:

<prefer-application-packages>    
 <package-name>com.java.*</package-name>     
 <package-name>com.rsa.*</package-name>   
</prefer-application-packages>

This is necessary because some classes are found by the system classloader when the table server JDBC driver is used or Web Authentication is enabled. In these situations, you might see ClassNotFoundExceptions's if your application uses classes in these jars that references other classes not on the system classpath.


  相关解决方案