Spring boot Liberty和Spring Boot 1.4.2的远程EJB问题

Spring boot Liberty和Spring Boot 1.4.2的远程EJB问题,spring-boot,ejb-3.1,websphere-liberty,Spring Boot,Ejb 3.1,Websphere Liberty,在Spring引导应用程序中使用Liberty概要文件进行远程EJB调用时,我遇到以下错误 org.omg.CORBA.BAD_PARAM: bad address: iiop port is invalid: vmcid: OMG minor code: 0x8 我的代码如下所示: InitialContext ctx = new InitialContext(); Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810#ejb/co

在Spring引导应用程序中使用Liberty概要文件进行远程EJB调用时,我遇到以下错误

org.omg.CORBA.BAD_PARAM: bad address: iiop port is invalid:  vmcid: OMG minor code: 0x8
我的代码如下所示:

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810#ejb/com/dwl/base/requestHandler/beans/DWLServiceController");
dwlServiceControllerHome = (DWLServiceControllerHome) PortableRemoteObject.narrow(obj, DWLServiceControllerHome.class);
错误跟踪:

[err] org.omg.CORBA.BAD_PARAM: bad address: iiop port is invalid:  vmcid: OMG minor code: 0x8  completed: No
[err]   at org.apache.yoko.orb.OCI.IIOP.CorbalocProtocol_impl.parse_address(CorbalocProtocol_impl.java:121)
[err]   at [internal classes]
[err]   at javax.naming.InitialContext.lookup(InitialContext.java:417)
我正在使用JEE 7完整配置文件Liberty profile 16.0.0.3。

您可以尝试在端口后添加“NameServiceServerRoot”:

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810/NameServiceServerRoot#ejb/com/dwl/base/requestHandler/beans/DWLServiceController");

dwlServiceControllerHome = (DWLServiceControllerHome) PortableRemoteObject.narrow(obj, DWLServiceControllerHome.class);
我们解决了将CORBA.BAD_参数添加到url的错误。我们的案例是从Liberty概要文件调用was中已部署的ejb,您可以尝试在端口后添加“NameServiceServerRoot”:

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("corbaloc:iiop:my.host.com:9810/NameServiceServerRoot#ejb/com/dwl/base/requestHandler/beans/DWLServiceController");

dwlServiceControllerHome = (DWLServiceControllerHome) PortableRemoteObject.narrow(obj, DWLServiceControllerHome.class);

我们解决了将CORBA.BAD_参数添加到url的错误。我们的案例是从Liberty概要文件调用was中已部署的ejb

您是否已将默认iiop端点配置为端口9810?默认情况下,它是端口2809。@aguibert I已按如下所示进行配置您是否已将默认iiop端点配置为端口9810?默认情况下,它是端口2809。@aguibert我已按如下方式配置