问题描述
我有一个使用 jacorb.jar (org.omg.orb.ORB.class) 的应用程序.当我在 WAS 8.5.5 中部署我的 war 文件时,我收到了位于 openJdk/jre/lib/ibmorb.jar 文件中的 ibmorb 的 classcast 异常.任何人都可以帮助我使用 jacorb.jar 并解决错误.
I have an application which is using jacorb.jar (org.omg.orb.ORB.class). When i deploying my war file in WAS 8.5.5, I am getting classcast exceptions with ibmorb located at openJdk/jre/lib/ibmorb.jar file. Could anyone help me in using jacorb.jar and resolving errors.
错误:
[3/3/15 5:30:51:863 PST] 00000001 ActivityServi E WACT0001E: The method pre_init(ORBInitInfo) in class com.ibm.ws.activity.remote.cos.ActivityServiceClientInterceptor received an unexpected exception;
the exception stack trace follows: java.lang.ClassCastException: org.jacorb.orb.portableInterceptor.ORBInitInfoImpl incompatible with com.ibm.CORBA.iiop.ExtendedORBInitInfo
at com.ibm.ws.activity.remote.cos.ActivityServiceClientInterceptor.pre_init(ActivityServiceClientInterceptor.java:219)
at org.jacorb.orb.ORB.interceptorPreInit(Unknown Source)
at org.jacorb.orb.ORB.internalInit(Unknown Source)
at org.jacorb.orb.ORB.set_parameters(Unknown Source)
at org.omg.CORBA.ORB.init(ORB.java:371)
Caused by: java.lang.ClassCastException: org.jacorb.orb.ORB incompatible with com.ibm.CORBA.iiop.ORB
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
推荐答案
IBM 不支持第三方 ORB,因为它提供了自己的 ORB.您可以在 IBM JAVA jre 文件夹中找到具有默认属性的 orb.properties.如果您想添加任何需要通知 JRE 的与 ORB 相关的内容,我们可以在此属性文件夹中添加一个条目.
IBM doesn't support third party ORB as it provides its own ORB. You can find the orb.properties with default properties in IBM JAVA jre folder. If you want to add anything related to ORB that need to inform JRE , we can add an entry in this property folder.
我已经从我的代码中完全删除了 JacORB 并使用了 IBM ORB.如果您使用 JacORB 编译代码并在 IBM websphere 中使用相同的代码,则它们不会有任何问题,因为包结构和方法签名不会改变.我已经对此进行了实际测试.
I have completely removed the JacORB from my code and used IBM ORB. They wont be any problem if you compile your code with JacORB and to use the same in IBM websphere as the package structure and method signature wont change. I have tested this practically.
有关创建 corba 名称空间和在代码中使用它的更多信息,请参阅此线程.如果你遵循这些,你就不需要在 IBM websphere 中添加 jacorb jar.
Refer to this thread for more information in creating a corba name space and using it in code. If you follow those, you wont need to add jacorb jars in IBM websphere.
Websphere 8.5.5 中的 Corba NameService 配置
这篇关于ClassCastException b/w IBMorb 和 WAS 8.5.5 中的 jacorb jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!