Hi Prithvi,
instead of host name can I use IP Address?
My Code:
public class SampleService {
public static void main(String[] args) {
// TODO Auto-generated method stub
String systemName = "192.168.1.30:6400";//"ERPBOP.erpanderp.com:6400";
//String clusterName = "@ERPBOP.erpanderp.com:6400";
String userName = "****";
String password = "****";
String authType = "secEnterprise";
IEnterpriseSession enterpriseSession=null;
ISessionMgr enterpriseSessionMgr = null;
try{
enterpriseSessionMgr = CrystalEnterprise.getSessionMgr();
System.out.println("In sample application ");
if (enterpriseSession == null)
{
System.out.println("Before getting conncted ..... ");
enterpriseSession = enterpriseSessionMgr.logon(userName, password, systemName, authType);
//enterpriseSession = enterpriseSessionMgr.logon(userName, password, clusterName, authType);
System.out.println("Enterprise Manager : " + enterpriseSession);
}
}
catch(Exception e){
e.printStackTrace();
/*try {
enterpriseSession = enterpriseSessionMgr.logon(userName, password, clusterName, authType);
} catch (SDKException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}*/
}
}
}
Error :
In sample application
Before getting conncted .....
com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$CommunicationError: Communication error occurred when trying to connect to server 192.168.1.30:6400 (FWM 01009)
cause:com.crystaldecisions.thirdparty.org.omg.CORBA.TRANSIENT: attempt to establish connection failed: java.net.ConnectException: Connection refused: connect minor code: 0x4f4f0001 completed: No
detail:Communication error occurred when trying to connect to server 192.168.1.30:6400 (FWM 01009) attempt to establish connection failed: java.net.ConnectException: Connection refused: connect
at com.crystaldecisions.enterprise.ocaframework.RawAPSDirectory.find(RawAPSDirectory.java:256)
at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildAPSClusterInfo(APSServerHandler.java:585)
at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildServerInfo(APSServerHandler.java:192)
at com.crystaldecisions.enterprise.ocaframework.ServerController.redirectServer(ServerController.java:531)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.redirectServer(ServiceMgr.java:933)
at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:254)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:516)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:643)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:814)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogon(LogonService.java:208)
at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon(SecurityMgr.java:203)
at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody0(SessionMgr.java:457)
at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody1$advice(SessionMgr.java:512)
at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionMgr.java:1)
at com.sap.bibo.service.SampleService.main(SampleService.java:26)
Caused by: com.crystaldecisions.thirdparty.org.omg.CORBA.TRANSIENT: attempt to establish connection failed: java.net.ConnectException: Connection refused: connect minor code: 0x4f4f0001 completed: No
at com.crystaldecisions.thirdparty.com.ooc.OCI.IIOP.Connector_impl.connect(Connector_impl.java:167)
at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.createTransport(GIOPClient.java:233)
at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClientWorkersPool.next(GIOPClientWorkersPool.java:122)
at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.getWorker(GIOPClient.java:105)
at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.startDowncall(GIOPClient.java:409)
at com.crystaldecisions.thirdparty.com.ooc.OB.Downcall.preMarshalBase(Downcall.java:181)
at com.crystaldecisions.thirdparty.com.ooc.OB.Downcall.preMarshal(Downcall.java:298)
at com.crystaldecisions.thirdparty.com.ooc.OB.PIDowncall.preMarshal(PIDowncall.java:198)
at com.crystaldecisions.thirdparty.com.ooc.OB.DowncallStub.preMarshal(DowncallStub.java:265)
at com.crystaldecisions.thirdparty.com.ooc.OB.DowncallStub.setupRequest(DowncallStub.java:545)
at com.crystaldecisions.thirdparty.com.ooc.CORBA.Delegate.request(Delegate.java:556)
at com.crystaldecisions.thirdparty.com.ooc.CORBA.Delegate.is_a(Delegate.java:373)
at com.crystaldecisions.thirdparty.org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:88)
at com.crystaldecisions.enterprise.ocaframework.idl.ImplServ.OSCAFactoryExHelper.narrow(OSCAFactoryExHelper.java:100)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getOSCAFactory_aroundBody8(ServiceMgr.java:546)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getOSCAFactory(ServiceMgr.java:1)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getUnmanagedService_aroundBody16(ServiceMgr.java:715)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getUnmanagedService(ServiceMgr.java:1)
at com.crystaldecisions.enterprise.ocaframework.RawAPSDirectory.find(RawAPSDirectory.java:155)
... 15 more
Thanks
Vijay