简体   繁体   English

从Weblogic上的特定jar加载类

[英]Loading a class from a specific jar on Weblogic

I have an application deployed on Weblogic and because of a lock contention generated by a Xerces bug i would like to 'force' Weblogic to use the correct jar where the bug is already fixed. 我在Weblogic上部署了一个应用程序,由于Xerces错误产生了锁争用,我想“强制” Weblogic使用已修复该错误的正确jar。

http://svn.apache.org/viewvc?view=revision&revision=558581 (xerces bug fixed) http://svn.apache.org/viewvc?view=revision&revision=558581 (修复了一些错误)

Is there a way to be sure that the class from a specific jar is loaded and used by my application. 有没有一种方法可以确保来自特定jar的类已被我的应用程序加载和使用。

By default weblogic is using the old buggy Xerves in multiple internal librares: 默认情况下,weblogic在多个内部库中使用旧的越野车Xerves:

com.bea.core.apache_1.2.0.0.jar
com.bea.core.apache.xercesImpl_2.8.1.jar

Thanks 谢谢

One way is to modify the CLASSPATH of Weblogic startup scripts so that it contains the desired jar before the jar containing the buggy version of the library. 一种方法是修改Weblogic启动脚本的CLASSPATH ,以使其在包含库的错误版本的jar之前包含所需的jar。

You can modify eg domain/bin/setEnv.sh . 您可以修改例如domain/bin/setEnv.sh

Use -verbose:class to verify that the correct version of the Class is loaded. 使用-verbose:class来验证是否加载了正确的Class版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM