We have a client that is using the SDK for invoking reports on the Business Objects Embedded Report Server. We can login, but when calling the openDocument method, something goes wrong.
code:
//LOGON
IEnterpriseSession session = sessionMgr.logon(username, password, clusterNode, authType);
IInfoStore infoStore = (IInfoStore)session.getService("InfoStore");
//GET REPORT OBJECT
String queryForFolder = "Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_NAME = '" + folderName + "'";
IInfoObjects queryForFolderResult = infoStore.query(queryForFolder);
if (queryForFolderResult.isEmpty())
{
throw new Exception("No Folder Found");
}
//report folder found
IInfoObject reportFolder = (IInfoObject)queryForFolderResult.get(0);
String queryForFile = "Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_NAME = '" + reportFile + "'" + " and SI_PARENTID = " + reportFolder ;
IReportAppFactory reportAppFactory = (IReportAppFactory)session.getService("RASReportFactory");
IInfoObjects queryForFileResult = infoStore.query(queryForFile);
if (queryForFileResult.isEmpty())
{
throw new Exception("Report file not found");
}
//report found
IReport report = (IReport)queryForFileResult.get(0);
//OPEN REPORT
clientDoc = reportAppFactory.openDocument(report, 0, locale); /*row 58 in exception*/
exception:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: . - Server not found or server may be down---- Error code:-2147217387 Error code name:connectServer
at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
at com.reportclient.MyReportClient.getReportFromInfoStore(MyReportClient.java:58)
... 28 more
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: . - Server not found or server may be down---- Error code:-2147217387 Error code name:connectServer
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ras.internal.CECORBACommunicationAdapter.connect(Unknown Source)
... 32 more
Caused by: com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$NotFoundInDirectory: Server not found or server may be down
at com.crystaldecisions.enterprise.ocaframework.j.find(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.AbstractServerHandler.buildServerInfo(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.AbstractServerHandler.buildClusterInfo(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.aa.for(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.for(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.p.a(Unknown Source)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(Unknown Source)
... 33 more
The communication obviously works when logging in. Please let me know if you got any ideas or know where I can go and look for the answer. :)
Regards, Karl
After some further research, this is what I found out. The first error was cased by usage of an earlier version of the BO SDK. The second error, "CORBA communication failure: reason[error number WSAETIMEDOUT]" occurs when the iiop-port is not opened. I solved this by setting the SDK listener port (described in the document http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/0047e5f4-3140-2b10-1bae-de175e4c741c?QuickLink=index&overridelayout=true) and triple check that the correct firewall opening was made.