【发布时间】:2014-07-25 09:57:10
【问题描述】:
exception loader constraint violation: when resolving method "org.apache.hadoop.io.IOUtils.cleanup(Lorg/apache/commons/logging/Log;[Ljava/io/Closeable;)V" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/hadoop/hdfs/FileInputStreamCache, and the class loader (instance of weblogic/utils/classloaders/GenericClassLoader) for resolved class, org/apache/hadoop/io/IOUtils, have different Class objects for the type org/apache/commons/logging/Log used in the signature
我在使用应用程序时得到这个,而不是在部署耳朵时。如果我理解这个赖特,我有两个类加载器,它们有两个不同的日志记录对象?我如何将它们都推荐给一个?
编辑 1
经过进一步调查,我认为这个错误是由于我们使用的是公共 jars 库,并且那里有另一个版本的 commons,使它们发生冲突。有没有办法指定 weblogic 使用特定的库而不是打包?我想进一步调查一下
【问题讨论】:
-
你用什么来管理你的应用程序的依赖关系?
-
你的 poms 中是否依赖于 commons-logging?如果是,请尝试提供的范围(如果尚未设置)。
标签: java apache weblogic-10.x