views:

265

answers:

2

Hi!

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

A: 

I'm going to guess that the ReportEngine that you are using, your variable reportAppFactory, is not correct for the type of document you are attempting to open.

The other possibility is that this is a DeskI report and it is looking for the Connection Server component to be able to open the document.

I will attempt to help, if you could provide some more details.

shrub34
Hi!Thanks for your reply. I have updated the code with some more details. I'm trying to run a Crystal .rpt-file. It has been uploaded to the BO repository and published. /Karl
Dev_Karl
Did my last update make you any wiser?Read somewhere that the communication change ports when the report should be transfered. Where among all API calls does that happens? Which port is used then?
Dev_Karl
It did give me more clarity. Port changes should be abstracted out of the system. As long as your session is correct the rest of the system determines its ports on its own. Everything that you are doing looks correct; have you verified that the Crystal Servers (inside the CMC) are running, enabled and the user your session is for is allowed to us it? I may be close to the end of my knowledge, since I have not used nor do we have Crystal installed.
shrub34
After updating some jars, the client works for some minutes, but no document is received. On the server side, we are getting this error:(.\dts \corbaclientrequestcommadapter.cpp:419): CORBA communication failure: reason[error number WSAETIMEDOUT] minor[1330577418] reqType[154] agentId=[""] ErrorLog 2010 6 1 (.\dts\corbaclientrequestcommadapter.cpp:320): Resending result to client. reqType=154 agentId="" nRetryInterval=1000Any ideas?BRKarl
Dev_Karl
If you haven't tried the BOB Forums yet, that would be my recommendation at this point http://forumtopics.com/busobj/index.php
shrub34
+1  A: 

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.

Dev_Karl