Websphere 9中Java ear-file的Java.lang.LinkageError。

问题描述 投票:0回答:1

我在Websphere 9中得到了这个错误的Java应用程序部署为EAR-文件,当我试图调用我的一个Web服务。

Caused by: java.lang.LinkageError: ClassCastException: attempting to castbundleresource://265.fwk-1702970980/javax/ws/rs/client/ClientBuilder.class to wsjar:file:/opt/app/was/WebSphere/AppServer/profiles/prctstwas01/installedApps/lsp7288cNode01Cell/OurApplicaton.ear/OurApplicationWeb.war/WEB-INF/lib/integration-commons

我明白这个错误是什么,我通过设置我的ear-file中的war-file的classloader为parent首先解决了这个问题,如果有人搜索这个错误,不知道如何解决它。但我不明白类的第一个版本在哪里?65.fwk-1702970980javaxwsrsclientClientBuilder.class。 的来源。

有谁知道捆绑资源:/265.fwk-1702970980指的是什么?我猜它也是我的war-file捆绑的类的一个版本?它看起来不像是来自应用服务器。

java websphere websphere-9
1个回答
0
投票

bundleresource URL 来自 OSGi 类加载器。在 WebSphere 的情况下,这通常意味着它们是由服务器提供的,因为基本上整个服务器运行时都在 OSGi 中运行。265.fwk-1702970980 是 bundle 的内部名称 - 如果使用 OSGi 控制台列出 bundle,JAX-RS API bundle 可能是 bundle 编号 265。

© www.soinside.com 2019 - 2024. All rights reserved.