Skip to Content
0
Former Member
Mar 26, 2009 at 08:34 PM

Crystal Reports Server 2008 - RAS API ReportAppSession.initialize() fail

62 Views

Hi,

We have a servlet (running on Websphere 6.1 container) trying to connect to Crystal Reports Server 2008 using RAS Java API to open unmanaged reports.

It fails at the very beginning of ReportAppSession.initialize() with error message:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: HQ-ROSIE03. - Connection refused: connect -- Error code:-2147217387 Error code name:connectServer

HQ-ROSIE03 is the server name hosting CRS 2008. I try to pass in either HQ-ROSIE03 or HQ-ROSIE03:1566 to setReportAppServer(), but no help.

On CRS2008, I checked from Central Management Console that all servers are up and running. I also add "-ipport 1566" to the commandline of ReportApplicationServer from CMC. It does not help either.

Would you please tell me what might cause the problem based on the error code and message? Thank you.

Here is the code.

try

{

ReportAppSession reportAppSession = new ReportAppSession();

reportAppSession.createService(

"com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");

//HQ-ROSIE03 is the server name that hosts Crystal Reports Server 2008.

//I tried to pass in the port number, i.e "HQ-ROSIE03:1566". But it got the same exception.

reportAppSession.setReportAppServer("HQ-ROSIE03");

// This is where the exception is thrown.

reportAppSession.initialize();

ReportClientDocument lo_ReportClientDoc = new ReportClientDocument();

lo_ReportClientDoc.setReportAppServer(reportAppSession.getReportAppServer());

lo_ReportClientDoc.open(asReportName,OpenReportOptions._openAsReadOnly);

ReportServerControl control = new ReportServerControl();

control.setReportSource(lo_ReportClientDoc.getReportSource());

}

catch(Exception exc)

{

System.out.println( exc);

}

Edited by: Lijing Lin on Mar 27, 2009 12:39 AM