我开发了一个ejb应用程序并部署在glassfish中,然后在本地工作。但是当我部署到JElastic时,它无法工作。
我在本地使用了glassfish 4.0,但在jelastic中使用了3.1.2.2。
它出现以下错误
连接失败:socketType:IIOP_CLEAR_TEXT;主机名:(主持人)
我的属性是......
Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs",
"com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", Server);
props.setProperty("org.omg.CORBA.ORBInitialPort", Port);
ContextObject = new InitialContext(props);
我的查询名称是 InterfaceObject = ContextObject.lookup(“java:global / ContextName / EJBJarname / BusinessClassName”);
它有什么解决方案......?
预先谢谢。 Mahavir .D
答案 0 :(得分:1)
Potentlially,与/ etc / hosts文件相关的问题可能会导致您遇到的问题(特定记录缺失)。我想查看已解决问题的this discussion我建议您联系Jelastic支持人员以合作方式审核您的主机文件。