从 NetBeans 平台客户端应用程序调用 Weblogic EJB 时发生 LinkageError
我在 NetBeans 平台应用程序中遇到以下链接错误,我在该应用程序中调用在 Weblogic 服务器上运行的 EJB。问题似乎是Oracle提供的wlfullclient.jar(Weblogic客户端)和JDK中的rt.jar(尝试使用JDK 6和7)包含一些相同的CORBA包。 wlfullclient.jar 作为包装的 JAR 包含在执行 EJB 调用的模块中。
我编写了一个独立的 Java 程序,它执行相同的操作并且运行良好。
任何帮助将不胜感激。
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "weblogic.corba.utils.ValueHandlerImpl.readValue(Lorg/omg/CORBA/portable/InputStream;ILjava/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable;" the class loader (instance of org/netbeans/StandardModule$OneModuleClassLoader) of the current class, weblogic/corba/utils/ValueHandlerImpl, and the class loader (instance of <bootloader>) for interface javax/rmi/CORBA/ValueHandler have different Class objects for the type org/omg/SendingContext/RunTime used in the signature
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1963)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:2001)
at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2266)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:40)
at weblogic.iiop.OutboundRequestImpl.flush(OutboundRequestImpl.java:125)
at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:160)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at za.vsp.ejb.accesscontrol.AccessControl_IIOP_WLStub.queryRolePermissionsByUser(Unknown Source)
at za.vsp.bd.accesscontrol.AccessControlBDRemoteCache.queryRolePermissionsByUser(AccessControlBDRemoteCache.java:502)
at za.vsp.bd.accesscontrol.AccessControlBDRemoteCache.hasPermission(AccessControlBDRemoteCache.java:573)
at za.vsp.util.modules.RichClientModuleInstall$1.run(RichClientModuleInstall.java:351)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:337)
at za.vsp.util.modules.RichClientModuleInstall.testThatShit(RichClientModuleInstall.java:349)
at za.vsp.util.modules.RichClientModuleInstall.restored(RichClientModuleInstall.java:504)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426)
[catch] at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1025)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:254)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:294)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)
at org.netbeans.core.startup.Main.start(Main.java:308)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:662)
I'm getting the below linkage error in a NetBeans Platform application where I call EJB's running on a Weblogic server. The problem seems to be that the wlfullclient.jar (Weblogic Client) provided by Oracle and the rt.jar in the JDK (tried with JDK 6 and 7) contain some of the same CORBA packages. The wlfullclient.jar is included as a wrapped JAR in the module doing the EJB call.
I wrote a standalone Java program that does the same and it runs fine.
Any assistance would be appreciated.
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "weblogic.corba.utils.ValueHandlerImpl.readValue(Lorg/omg/CORBA/portable/InputStream;ILjava/lang/Class;Ljava/lang/String;Lorg/omg/SendingContext/RunTime;)Ljava/io/Serializable;" the class loader (instance of org/netbeans/StandardModule$OneModuleClassLoader) of the current class, weblogic/corba/utils/ValueHandlerImpl, and the class loader (instance of <bootloader>) for interface javax/rmi/CORBA/ValueHandler have different Class objects for the type org/omg/SendingContext/RunTime used in the signature
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1963)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:2001)
at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2266)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:40)
at weblogic.iiop.OutboundRequestImpl.flush(OutboundRequestImpl.java:125)
at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:160)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at za.vsp.ejb.accesscontrol.AccessControl_IIOP_WLStub.queryRolePermissionsByUser(Unknown Source)
at za.vsp.bd.accesscontrol.AccessControlBDRemoteCache.queryRolePermissionsByUser(AccessControlBDRemoteCache.java:502)
at za.vsp.bd.accesscontrol.AccessControlBDRemoteCache.hasPermission(AccessControlBDRemoteCache.java:573)
at za.vsp.util.modules.RichClientModuleInstall$1.run(RichClientModuleInstall.java:351)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:337)
at za.vsp.util.modules.RichClientModuleInstall.testThatShit(RichClientModuleInstall.java:349)
at za.vsp.util.modules.RichClientModuleInstall.restored(RichClientModuleInstall.java:504)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426)
[catch] at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1025)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:254)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:294)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)
at org.netbeans.core.startup.Main.start(Main.java:308)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:662)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法通过删除 wlfullclient.jar 并将其替换为 Weblogic 应用程序服务器的 /wlserver_10.3/server/lib 目录中包含的最小 wlclient.jar 来解决此问题。我将 wlclient.jar 添加为项目模块之一中的包装 JAR。
I managed to resolve this by removing the wlfullclient.jar and replacing it with the minimal wlclient.jar included in the /wlserver_10.3/server/lib directory of the Weblogic Application Server. I added wlclient.jar as a wrapped JAR in one of the project modules.