Skip to Content
0
Former Member
Feb 11, 2009 at 08:31 AM

RAS Issue CORBA communication failure: reason[error number WSAECONNREFUSED]

648 Views

I have integrated Crystal Reports with my J2EE application using the Crystal RAS API.

I am facing a problem when I try to open the report using RAS API in my application.

We have deployed the application on Websphere Application server running on Linux (RHEL), and for the reports server, we have Business Objects XI 3.0 installed on a server running Windows Server 2003.

When I try to open a report using the RAS API, my application goes into indefinite wait. During that period, I have observed that the Business Objects server generates a log file which contains the following message.

ErrorLog 2009 1 19 4:59:37.187 6264 952 (.\dts\corbaclientrequestcommadapter.cpp:419): CORBA communication failure: reason[error number WSAECONNREFUSED] minor[1330577418] reqType[154] agentId=[""]

ErrorLog 2009 1 19 4:59:38.187 6264 952 (.\dts\corbaclientrequestcommadapter.cpp:320): Resending result to client. reqType=154 agentId="" nRetryInterval=1000

ErrorLog 2009 1 19 4:59:39.156 6264 952 (.\dts\corbaclientrequestcommadapter.cpp:419): CORBA communication failure: reason[error number WSAECONNREFUSED] minor[1330577418] reqType[154] agentId=[""]

In another instance, I have deployed my application on Websphere Application Server running on a Windows box instead of Linux.

I was successfully able to open the reports using the same code in this setup.

Setup A

Websphere Application Server running on Windows

Business Objects XI Server running on Windows

Setup B

Websphere Application Server running on Linux

Business Objects XI Server running on Windows

I have observed that I am able to open the reports in Setup A, but in Setup B I am facing this problem.

Kindly request the SAP forum members to help me in resolving the problem.

I am including the code below for reference.

Thanks and Regards,

Siva P.R. Sadhu

 

    // Method to get Crystal Enterprise Session
    public static IEnterpriseSession getCrystalEnterpriseSession(
                String userName, String password, String cmsName, String authType)
                throws ServiceException {

            try {
               
                // Connect to Crystal Enterprise
               
                    ISessionMgr sm = CrystalEnterprise.getSessionMgr();
                    crystalEnterpriseSession = sm.logon(userName, password, cmsName,
                           authType);
                   
                    /* In a production environment, it is recommended that you use Trusted Authentication single sign-on.
                     * To use Trusted Authentiction, both the server and the client machine must be configured before using the code below.
                     * For details, see "How do I use Trusted Authentication?" in the BusinessObjects Enterprise Java developer guide.
                     */
                    // ITrustedPrincipal trustedPrincipal = sm.createTrustedPrincipal(userName, cmsName);
                    // IEnterpriseSession enterpriseSession = sm.logon(trustedPrincipal);
                   
                    if(crystalEnterpriseSession!=null) {
                        logger.info("Logon Successful to Crystal Reports Server");
                    }else {
                        logger.error("Logon Not Successful to Crystal Reports Server");
                    }
               
            } catch (SDKException ex) {
                logger.error("getCrystalEnterpriseSession", ex);
               
            }catch (Exception ex) {
                logger.error("getCrystalEnterpriseSession", ex);
               
            }
            return crystalEnterpriseSession;
        }

    public static RepositoryReport getReportDocument(String reportName,
                HttpServletRequest request) {

            RepositoryReport repositoryReport = new RepositoryReport();
            try {
                IEnterpriseSession es = getCrystalEnterpriseSession(request);

                // Get the InfoStore service from Crystal Enterprise
                logger.debug("getting InfoStore");
                IInfoStore infoStore = (IInfoStore) es.getService("InfoStore");
                logger.debug("getting InfoStore SUCCESS");

                // Retrieve the report by name from Crystal Enterprise
                IInfoObjects oInfoObjects = infoStore
                        .query("Select * From CI_INFOOBJECTS Where SI_NAME = '"
                                + reportName + "'");
                // Open the report into a Report Document object
                if (oInfoObjects != null && oInfoObjects.size() != 0) {

                    IInfoObject infoObject = (IInfoObject) oInfoObjects.get(0);
                    repositoryReport.setReportDocument((IReport) infoObject);

                    //       Get the Report Application Factory service from Crystal
                    // Enterprise
                    logger.debug("getting RASReportFactory");
                    IReportAppFactory rptAppFactory = (IReportAppFactory) es
                            .getService("", "RASReportFactory");
                    logger.debug("getting RASReportFactory SUCCESS");

                    //The following code in red goes into indefinite wait
    repositoryReport.setReportClientDocument(rptAppFactory
                            .openDocument(infoObject, 0, Locale.ENGLISH));

                    logger.debug("Open Document SUCCESS");
                } else {
                    throw new Exception(
                            "The requested report cannot be found on the Reports Server");
                }

            } catch (SDKException ex) {
                logger.error("getReportDocument", ex);
               
            } catch (Exception ex) {
               logger.error("getReportDocument", ex);
            }
            return repositoryReport;
        }