从 Weblogic 11 迁移到 Weblogic 12,得到 ClassNotFoundException [英] Migrating from Weblogic 11 to Weblogic 12, getting ClassNotFoundException

查看:141
本文介绍了从 Weblogic 11 迁移到 Weblogic 12,得到 ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将一个包含多个 ear 文件的应用程序从 Weblogic 11 迁移到 Weblogic 12.其中三个 ear 文件运行良好,当我们部署第 4 个文件时,它在启动时抛出 ClassNotFoundException.

We are migrating an Application consisting of several ear files from Weblogic 11 to Weblogic 12. Three of the ear files are running well, when we deploy the 4th it throws a ClassNotFoundException on startup.

三个跑耳朵中的两个在这方面并不重要.所以,情况是A.ear运行正常,B.ear启动失败.

Two of the three running ears aren’t important in this regard. So, the situation is that A.ear runs fine, B.ear fails to start.

B.ears pom.xml 引用了 A.ear 的一个模块作为与 provided 和 ejb-client 的依赖关系,使用 maven-ear-plugin 将模块引用为 ejbClientModule.

B.ears pom.xml refers to a module of A.ear as dependency with provided and ejb-client, and using maven-ear-plugin it refers to the module as ejbClientModule.

由于 maven-ear-plugin,在 B.ear 中创建了一个 jar 镜像 A.ear 中的模块,在其名称中添加-client",但它仅包含来自 A 中模块的类的子集.ear.

Due to the maven-ear-plugin, a jar is created in B.ear mirroring the module in A.ear, adding "-client" to its name, but it only contains a subset of classes from the module in A.ear.

其中一个类派生自 ClassNotFoundException 所指的类.

One of this classes is derived from the class the ClassNotFoundException refers to.

该应用程序在 Weblogic 11 上以这种方式工作.

The application worked this way on Weblogic 11.

有人能告诉我如何解决这个问题并使应用程序在 Weblogic 12 上运行吗?

Can somebody please tell me how to fix this problem and make the application work on Weblogic 12?

推荐答案

如我们所想,ear 文件之间如此深的连接在 weblogic 中是不允许的,即使在 weblogic 11 中,类加载器层次结构按照 oracles 文档无法找到另一个耳朵罐子里的祖先类.它在 weblogic 11 中工作,似乎是一个错误,已在 weblogic 12 中修复.

As we figured, such deep connections between ear files are not allowed in weblogic, even in weblogic 11, the classloader hierarchy is as per oracles documentation unable to find the ancestor class in another ears jar. That it was working in weblogic 11, seems to be an error, that has been fixed in weblogic 12.

我们的解决方案是将两个耳朵文件合二为一.

The solution for us was to put the two ear files into one.

这篇关于从 Weblogic 11 迁移到 Weblogic 12,得到 ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆