Getting started with BusinessObjects Java SDK

BusinessObjects Report Engine Java SDK is primarily used for Web Intelligence customization. This post describes how to start development of a command line tool. Such tools can make life of report developers easier. They can be used for:

You will need:

  • A bit of programming experience
  • Eclipse IDE for Java Developers (http://www.eclipse.org/downloads/)
  • BusinessObjects Enterprise XI 3.1 server (to connect to)
  • BusinessObjects SDK libraries (see the list below)

New project in Eclipse

Download and extract Eclipse. Start it. Select default workspace folder (the new projects will be created in this folder). On the welcome page click “Go to Workbench”.

Create a new project:

1. File>New>Java Project

2. Specify project name (e.g. JavaTool).

3. Click Finish.

4. In the project folder on the disk (e.g. C:\Users\dbu\workspace\JavaTool\), create a folder lib and copy the jar files into it.

5. In Eclipse: Project>Properties>Java Build Path>Libraries, click “Add External JARs…”, OK.

6. Create package in the project. File>New>Package, type a name (e.g. org.bukhantsov.javatool), and click OK.

7. Create new class which will be starting point of the application. File>New>Class, type a name (e.g. Program), select option “public static void main” and click OK.

The generated class will be something like this:

package org.bukhantsov.javatool;
public class Program {
   /** 
   * @param args 
   */
   public static void main(String[] args) {
      // TODO Auto-generated method stub
   }
}

Let’s start

The first program will print all variables defined in Web Intelligence documents from a BOE server folder. Let’s consider functional blocks of the application.

Connect to CMS

The first thing you have to do is to connect to the BOE server.

ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession enterpriseSession =
  sessionMgr.logon("Administrator", "", "localhost", "secEnterprise");

Replace “localhost” with the name of your BOE server.

Get Webi documents from CMS

When you connected, you can get the objects corresponding to Webi documents from CMS.

IInfoStore infoStore = (IInfoStore) enterpriseSession.getService("InfoStore");
String query = "select SI_NAME, SI_ID from CI_INFOOBJECTS "
             + "where SI_KIND = 'Webi' and SI_INSTANCE=0";
IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);

You can build and test the query in BusinessObjects Query Builder.

Get report engine proxy

To open Webi document, you need to get a proxy to Webi report engine web service.

ReportEngines reportEngines =
   (ReportEngines) enterpriseSession.getService("ReportEngines");
ReportEngine wiRepEngine =
   (ReportEngine) reportEngines.getService(
      ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

Process Webi documents from a folder

In a loop you can process all Webi documents from a folder

for (Object object : infoObjects) {
   IInfoObject infoObject = (IInfoObject) object;
   String path = getInfoObjectPath(infoObject);
   if (path.startsWith("/")) {
      DocumentInstance widoc = wiRepEngine.openDocument(infoObject.getID());
      // process document
      widoc.closeDocument();
   }
}

The function getInfoObjectPath builds path to the Webi document. Parent of Webi document is folder, and parent of folder is folder. The root folder has id = 0.

public static String getInfoObjectPath(IInfoObject infoObject) throws SDKException {
   String path = "";
   while (infoObject.getParentID() != 0) {
      infoObject = infoObject.getParent();
      path = "/" + infoObject.getTitle() + path;
   }
   return path;
}

Print Webi document variables

ReportDictionary dic = widoc.getDictionary();
VariableExpression[] variables = dic.getVariables();
for (VariableExpression e : variables) {
   String name = e.getFormulaLanguageID();
   String expression = e.getFormula().getValue();
   System.out.println(" " + name + " " + expression);
}

Error handling

An important part of each program is error handling.

public static void main(String[] args) {
   IEnterpriseSession enterpriseSession = null;
   ReportEngines reportEngines = null;
   try {
      // * connect to CMS
      // * get report engine proxy
      // * get Webi documents from CMS 
      // * process the documents
   }
   catch (SDKException ex) {
      ex.printStackTrace();
   }
   finally {
      if (reportEngines != null) reportEngines.close();
      if (enterpriseSession != null) enterpriseSession.logoff();
   }
}

Put all together

The complete code can be downloaded from here (however without libs). You can import it from File menu: File > Import… > Existing Project into Workspace.

package org.bukhantsov.javatool;

import com.businessobjects.rebean.wi.DocumentInstance;
import com.businessobjects.rebean.wi.ReportDictionary;
import com.businessobjects.rebean.wi.ReportEngine;
import com.businessobjects.rebean.wi.ReportEngines;
import com.businessobjects.rebean.wi.VariableExpression;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;

public class Program {
   public static void main(String[] args) {
      IEnterpriseSession enterpriseSession = null;
      ReportEngines reportEngines = null;
      try {
         System.out.println("Connecting...");
         ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
         enterpriseSession = sessionMgr.logon("Administrator",
               "", "localhost", "secEnterprise");
         reportEngines = (ReportEngines) enterpriseSession
               .getService("ReportEngines");
         ReportEngine wiRepEngine = (ReportEngine) reportEngines
               .getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);         

         IInfoStore infoStore =
               (IInfoStore) enterpriseSession.getService("InfoStore");
         String query = "select SI_NAME, SI_ID from CI_INFOOBJECTS "
                      + "where SI_KIND = 'Webi' and SI_INSTANCE=0";
         IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);
         for (Object object : infoObjects) {
            IInfoObject infoObject = (IInfoObject) object;
            String path = getInfoObjectPath(infoObject);
            if (path.startsWith("/")) {
               DocumentInstance widoc = wiRepEngine.openDocument(infoObject.getID());
               String doc = infoObject.getTitle();
               System.out.println(path + "/" + doc);               
               printDocumentVariables(widoc);
               widoc.closeDocument();
            }
         }
      }
      catch (SDKException ex) {
         ex.printStackTrace();
      }
      finally {
         if (reportEngines != null)
            reportEngines.close();
         if (enterpriseSession != null)
            enterpriseSession.logoff();
      }
      System.out.println("Finished!");
   }

   public static void printDocumentVariables(DocumentInstance widoc ) {
      ReportDictionary dic = widoc.getDictionary();
      VariableExpression[] variables = dic.getVariables();
      for (VariableExpression e : variables) {
         String name = e.getFormulaLanguageID();
         String expression = e.getFormula().getValue();
         System.out.println(" " + name + " " + expression);
      }
   }        

   public static String getInfoObjectPath(IInfoObject infoObject) 
                                        throws SDKException {
      String path = "";
      while (infoObject.getParentID() != 0) {
         infoObject = infoObject.getParent();
         path = "/" + infoObject.getTitle() + path;
      }
      return path;
   }
}

Compile and run

You can run the program Run>Run.

Getting started with BusinessObjects RE Java SDK

To build executable JAR: go File>Export, select Java>Runnable JAR file. Select launch configuration (you will probably have the only one), select destination, select “Package required libraries into generated JAR”, and click Finish.

You can run the program using the following command:

java -jar javatool.jar

Final notes

Before running your tool on a bunch of reports it should be carefully tested. Especially if you do modifications.

The purpose of the code was to demonstrate how to access report engine. It does not demonstrate the best programming practices.

Java SDK Libraries

The Java SDK libraries can be found in the installation folder with BusinessObjects client tools or on the server.

C:\Program Files (x86)\Business Objects\common\4.0\java\lib

Required libraries:

  boconfig.jar
  cecore.jar
  celib.jar
  cesdk.jar
  cesession.jar
  corbaidl.jar
  ebus405.jar
  jtools.jar
  logging.jar
  rebean.common.jar
  rebean.jar
  rebean.wi.jar
  wilog.jar
  xpp3.jar
  xpp3_min.jar
  SL_plugins.jar

Links

Webi Report Engine Documentation

150 thoughts on “Getting started with BusinessObjects Java SDK

  1. Imane93

    Hello
    I found how to get the list of user who has access to a document and how to get SI_DISABLED from SI_ALIASES, so I’m sure there is someone need to know the solution:

    1 – Extract list of user has access to folder:

    IInfoObjects Folders = Name.getObjects("SELECT top 100 * " + 
        "FROM CI_INFOOBJECTS, CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE SI_KINd='Folder' ");
    Iterator infoObjectsIt = Folders.iterator();
    			  
    for (Iterator userInfon = Folders.iterator(); infoObjectsIt.hasNext(); ) {
        IInfoObject userInfom = infoObjectsIt.next();
        System.out.println(userInfom.getTitle() + 
           " ; " + userInfom.getSecurityInfo2().getEffectivePrincipals());
        csv.write(userInfom.getTitle()+" ; "+userInfom.getID());	
        //System.out.println(userInfom.getParent());
    }
    

    2- Extract SI_DISABLED:

    IProperty var2 = ((IProperties) ((IProperties) Name.properties()
                      .getProperty("SI_ALIASES").getValue()).getProperty("1")
                       .getValue()).getProperty("SI_DISABLED");
    

    Like

    Reply
      1. Zeek

        Hi Dmytro, i am hoping you can see my question and hopefully reply.
        I am new to the SDK and we have our BO environment on unix. How can i deploy java sdk solutions to our unix environment? Thank you so much.

        Like

      2. dmytro Post author

        I am not sure what you mean by deploy. What is your goal?

        Java is cross-platform so the only difference might be is the location of BO libraries. But the path will probably include something like “common/4.0/java/lib” anyway.

        Like

      3. Zeek

        Thanks for your reply.
        Our goal is to build an application which can schedule multiple reports and multiple users can use it to schedule reports.
        Also, I mean the examples you posted are all showing on windows and using eclipse for windows. Does every development of SDK need to be on the server where Businessobjects is installed? Since it uses all the libs from businessobjects installed directory. Could it be done on a local machine? And then export to a unix machine?

        Like

      4. dmytro Post author

        BO Java SDK can be installed on a client machine without installation of BusinessObjects on that machine. Basically you just copy necessary JAR files from your server. It is Java so it should run anywhere. 🙂

        Maybe use of “localhost” in the examples is misleading, but the post does not require you to develop on server, you only need connectivity to the server.

        Like

      5. Zeek

        So you mean when i copy the jar files and put them in Eclipse IDE i will have to put the path of the server where those files are located? Is that what you mean by “you only need connectivity to the server”? Im sorry for so many questions which are probably annoying to you but you are very helpful and thank you for that 🙂

        Like

      6. dmytro Post author

        So you copied the JAR files from the server to your machine to the folder ‘lib’ in your java project folder (as described in “New project in Eclipse”). Then you configure the build path for the project adding those JARs as external libraries. Now you should be able to run your code. But the program you compiled must be able to connect to the BO server via BO API. 1) You should be able to ping the server by server name (Usually if you can only ping by IP and not server name, the program will not work. You will have to adjust hosts file to fix this). 2) Some ports should be open on the server, in particular CMS port – 6400 (by default). I am not sure, but maybe some other ports are also required.

        When you’ve done and ready for exporting of your code to the final (see “Compile and Run”), there are two options in Eclipse:
        1) You can package all referenced libraries into your JAR. It is very easy to run such program because you do not need to specify any classpath.
        2) You can copy referenced libraries into a folder with your JAR. In this case, you will have to reference the libraries from the command line via classpath. So deploying the JAR on the server you can reference to the original folder with libraries (from where you copied JARs). The big benefit of this option is that if you upgrade your BO, your code will use the latest libraries.

        Thanks for your questions and do ask more 🙂

        Like

      7. Zeek

        Prasiba… My friend you are the most helpful person i have found ( i really mean that ). Im not saying that because you helped but really 🙂

        Like

  2. MadBO

    Hi Dmytro:
    first off – Superb blog!
    I am a newbie and using your code to doc webi reports:
    Am getting an error :
    com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAcdz.WICDZServer._WICDZProxy cannot be cast to com.businessobjects.corba.generic.container.GenericContainer.IWorkSessionOperations

    at Open Doc
    i.e here IDocumentInstance doc = documentInstanceManagementService
    .openDocument(context, infoObject.getID());

    Any thoughts please?

    Like

    Reply
  3. lalla

    hello !

    i need your help please !

    how can i get for each folder user who has acces and how we can print if he has just advance or herite acces ?

    Thanks !

    Like

    Reply
  4. rakhy

    Thanks for the good work.
    Can you please let me know how to read an excel file which is in BO server using BOBJ SDK? I am trying to pass prompts parameters through excel.

    Let me know if the question is not clear!

    Regards,
    Rakhy.

    Like

    Reply
  5. Frikkie Nagel

    Hi There,

    Is it possible with the Business Objects XI3.1 SDK/Scripting to point Crystal Reports to another(same) universe in a different folder

    i.e. I have duplicated a universe(A) to universe(B) a new folder and I have a set of Crystal reports in folder(A) that points to Universe(A) I have copied the Crystal Reports(A) to Folder(B) still pointing to Universe(A)and want to point these Crystal reports to Universe(B) without going into Crystal Designer and edit each of the 100+ reports and manually point it to universe(B) etc. etc.

    we have a multi customer environment on 1 BOE severer and each customer has a copy of the universe(lets call it the standard universe) and I need to deploy the standard set of reports for each customer and point it to the required universe which in turns points to the customers database.

    Reasons Being
    1. This is time consuming
    2. Crystal can manually only do about 5 reports and then you have to close Crystal Designer and open it again
    3. We have over 100 customers on the 1 BOE server

    Like

    Reply
  6. Allen W

    Hello, thank you for these examples – they’ve really helped me. I was wondering if you could look at an issue I’m currently working on – trying to display/round a floating point number to a certain decimal length. I’ve posted on stackoverflow and the SAP support forums, but no much in terms of replies yet. Here’s a repost of what I’ve been trying to use to display the number – Any help is appreciated!:

    “…
    INumericFieldFormat numericFieldFormat = new NumericFieldFormat();

    numericFieldFormat.setNDecimalPlaces(10); // User wants to see up to 10 decimal places
    numericFieldFormat.setDecimalSymbol(“.”);
    numericFieldFormat.setThousandsSeparator(false);

    // supports the 10 decimal requirement
    numericFieldFormat.setRoundingFormat(RoundingType.roundToTenBillionth);
    numericFieldFormat.setEnableUseLeadZero(true);
    numericFieldFormat.setConditionFormulas(null);

    final ICommonFieldFormat commonFieldFormat = new CommonFieldFormat();

    commonFieldFormat.setEnableSystemDefault(false);

    final IFieldFormat fieldFormat = fieldObject.getFieldFormat();

    fieldFormat.setNumericFormat(numericFieldFormat);
    fieldFormat.setCommonFormat(commonFieldFormat);
    fieldObject.setFieldFormat(fieldFormat);

    So far I’ve been able to make the Excel output look like 0.0600000000 and the CSV output look like 600000000, but that’s not what I need. …”

    Like

    Reply
  7. Kevin G

    Hey Dymtro, best regards your help has been most helpful

    Could you quickly review this code. for some reason it fails on the last statement here.
    // Connect to CMS
    System.out.println(“Connecting…”);
    ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
    enterpriseSession = sessionMgr.logon(user, pass, host, auth);

    // Initialize Webi report engine
    reportEngines = (ReportEngines) enterpriseSession.getService(“ReportEngines”);
    ReportEngine reportEngine = (ReportEngine) reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

    // Retrive the list of all document and search the one with the specified name
    // If the Id or CUID of the document is known, the query can be more specific,
    // so there will be no need to loop through whole list of Webi documents.
    IInfoStore infoStore = (IInfoStore) enterpriseSession.getService(“InfoStore”);
    String queryString = “select SI_ID from CI_INFOOBJECTS where SI_KIND = ‘Webi’ and SI_NAME=’EFashion Sample 1′ and SI_INSTANCE=0”;
    IInfoObjects infoObjects = infoStore.query(queryString);
    Iterator infoObjectsIter = infoObjects.iterator();
    while(infoObjectsIter.hasNext()) {
    IInfoObject infoObject = (IInfoObject) infoObjectsIter.next();
    System.out.println(infoObject.getTitle());
    String path = getInfoObjectPath(infoObject);
    System.out.println(path);
    System.out.println(infoObject.getID());

    // IInfoObject infoObject = (IInfoObject) object;
    // String path = getInfoObjectPath(infoObject);
    // System.out.println(path);
    // if (path.equals(name)) {

    // String title = infoObject.getTitle();

    // Open the document
    System.out.println(“Open doc…”);
    DocumentInstance doc = reportEngine.openDocument(infoObject.getID());

    this is what I see in the eclipse Run session
    Connecting…
    EFashion Sample 1
    /Report Samples/EFashion Sample 1
    6228932
    Open doc…
    [2014-06-05 10:21:09,462] [ERROR] [com.businessobjects.corba.generic.container.proxy.AbstractWorkSessionProxy] unable to process the recovery steps
    java.lang.Exception: unable to recover the UserSession : no information set in the StateContext
    at com.businessobjects.webi.proxies.WebiUserSessionStateContext.recoverState(WebiUserSessionStateContext.java:48)
    at com.businessobjects.corba.generic.container.proxy.AbstractWorkSessionProxy.recover(Unknown Source)
    at com.crystaldecisions.enterprise.ocaframework.ManagedService.invoke(ManagedService.java:544)
    at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAcdz.WICDZServer._WICDZUserSessionProxy.openSession(_WICDZUserSessionProxy.java:753)
    at com.businessobjects.rebean.wi.newserver.exec.WebiUserSessionExecutor.openSession(WebiUserSessionExecutor.java:23)
    at com.businessobjects.sdk.core.server.internal.session.ConnectSessionCommand.execute(ConnectSessionCommand.java:94)
    at com.businessobjects.sdk.core.server.internal.corba.CorbaServerImpl.doProcess(CorbaServerImpl.java:79)
    at com.businessobjects.sdk.core.server.internal.AbstractServer.processIt(AbstractServer.java:171)
    at com.businessobjects.sdk.core.server.internal.AbstractServer.process(AbstractServer.java:133)
    at com.businessobjects.rebean.wi.impl.engine.ReportEngineContext.initUserServer(ReportEngineContext.java:405)
    at com.businessobjects.rebean.wi.impl.services.ConfigurationServiceImpl.getAppSettings(ConfigurationServiceImpl.java:166)
    at com.businessobjects.rebean.wi.impl.engine.DocumentPropertiesHelper.updateComputedProperties(DocumentPropertiesHelper.java:78)
    at com.businessobjects.rebean.wi.impl.services.DocumentLoadingServiceImpl.loadOutputResponse(DocumentLoadingServiceImpl.java:250)
    at com.businessobjects.rebean.wi.impl.services.DocumentLoadingServiceImpl.updateWithOutputResponses(DocumentLoadingServiceImpl.java:303)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.loadResponses(DocumentInstanceManagementServiceImpl.java:1005)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:186)
    at com.businessobjects.rebean.wi.impl.services.DocumentInstanceManagementServiceImpl.openDocument(DocumentInstanceManagementServiceImpl.java:81)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:429)
    at com.businessobjects.rebean.wi.internal.WIReportEngine.openDocument(WIReportEngine.java:438)
    at WebiRefresh.main(WebiRefresh.java:96)
    Finished!
    ……

    Like

    Reply
  8. Max

    Hi,

    I am not very good at programming. I downloaded eclipse and did the step by step stuff you posted. But I get the following error: “Editor does not contain a main type”,. It sounds as a simple error to me, but I can’t figure it out.

    My original issue was that I unintentionally deleted a universe and a very big report is running on it. The “change source” functionality is not working, and I fear I will have to do the Report again. This is 4 to 5 days of work.

    How can I solve the “main type” Problem?

    Thank you very much for your help

    Like

    Reply
  9. Niju Alex

    I have a webi report, that need to be published in PDF/XL format and exported to a public folder using a java program. Publishing is happening fine. But the copied file is corrupt when I open it from the public folder. But its fine when i look at the history page from CMC. what may be the issue ?

    Like

    Reply
  10. Niju Alex

    I have a webi report, that need to be published and exported in CSV format and need to be saved to CMC file system folder. Do you have any sample java code for that ?

    Like

    Reply
  11. Chaitanya

    Hi dmytro,

    I have configured Access rights to users. User A has access to doc A, user B has access to doc B. When User A tries to access Doc B, it throws error saying – ERROR HAS OCCURRED: COULD NOT FIND THE DOCUMENT.

    Is there anyway to customize this error message? I just want to show user that ACCESS RESTRICTED. something like that…

    Kindly help. I am not sure if this can be achieved through JAVA SDK as I am new to SDK.

    I will highly appreciate your

    Like

    Reply
  12. Rakhy

    Hi Dmytro,

    How can we write an excel to BO using BOBJ? I am able to read an excel from BO but I am facing issues while writing an excel to BO.

    Thanks,
    Rakhy.

    Like

    Reply
  13. Mertcan Yücel

    Hi there good explanation but when i want to reach my server via your code. It’s giving me this error:
    I searched for it on Internet but I couldn’t find anything about that. I closed the firewall. The server that I want to reach is on the virtual machine I don’t know why I can’t connect.

    Error Log:
    Connecting…
    log4j:ERROR setFile(null,true) call failed.
    java.io.FileNotFoundException: /Users/metric/.businessobjects/visualdiff.log (No such file or directory)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.(FileOutputStream.java:192)
    at java.io.FileOutputStream.(FileOutputStream.java:116)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
    at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:156)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
    at com.businessobjects.foundation.logging.log4j.Log4jProvider.configure(Log4jProvider.java:69)
    at com.businessobjects.foundation.logging.spi.ConfigurableLoggingProvider.configureResources(ConfigurableLoggingProvider.java:81)
    at com.businessobjects.foundation.logging.log4j.Log4jProvider.initializeConfiguration(Log4jProvider.java:118)
    at com.businessobjects.foundation.logging.LoggerManager.setProvider(LoggerManager.java:240)
    at com.businessobjects.foundation.logging.LoggerManager.setProvider(LoggerManager.java:208)
    at com.businessobjects.foundation.logging.LoggerManager.setProviderFromConfig(LoggerManager.java:164)
    at com.businessobjects.foundation.logging.LoggerManager.(LoggerManager.java:71)
    at com.crystaldecisions.sdk.framework.CrystalEnterprise.(CrystalEnterprise.java:86)
    at net.metric.bofirsttry.BusinessObjects.main(BusinessObjects.java:22)
    Could not reach CMS ‘myhost’. Specify the correct host and port and check for network issues. (FWM 20030)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:695)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:838)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:815)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogon(LogonService.java:211)
    at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon(SecurityMgr.java:177)
    at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody0(SessionMgr.java:454)
    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 net.metric.bofirsttry.BusinessObjects.main(BusinessObjects.java:23)
    Caused by: com.crystaldecisions.sdk.exception.SDKException$OCAFramework: Communication error occurred when trying to connect to server myhost (FWM 01009)
    cause:com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$CommunicationError: Communication error occurred when trying to connect to server myhost (FWM 01009)
    cause:com.crystaldecisions.thirdparty.org.omg.CORBA.COMM_FAILURE: gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3 minor code: 0x4f4f000e completed: No
    detail:Communication error occurred when trying to connect to server myhost (FWM 01009) gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3
    detail:Communication error occurred when trying to connect to server myhost (FWM 01009) gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3
    at com.crystaldecisions.sdk.exception.SDKException.map(SDKException.java:142)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:694)
    … 8 more
    Caused by: com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$CommunicationError: Communication error occurred when trying to connect to server myhost (FWM 01009)
    cause:com.crystaldecisions.thirdparty.org.omg.CORBA.COMM_FAILURE: gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3 minor code: 0x4f4f000e completed: No
    detail:Communication error occurred when trying to connect to server myhost (FWM 01009) gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3
    at com.crystaldecisions.enterprise.ocaframework.RawAPSDirectory.find(RawAPSDirectory.java:256)
    at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildAPSClusterInfo(APSServerHandler.java:581)
    at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildServerInfo(APSServerHandler.java:192)
    at com.crystaldecisions.enterprise.ocaframework.ServerController.redirectServer(ServerController.java:534)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.redirectServer(ServiceMgr.java:959)
    at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:258)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
    at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:651)
    … 8 more
    Caused by: com.crystaldecisions.thirdparty.org.omg.CORBA.COMM_FAILURE: gethostbyname() failed: java.net.UnknownHostException: SAPBO41SP3 minor code: 0x4f4f000e completed: No
    at com.crystaldecisions.thirdparty.com.ooc.OCI.IIOP.Connector_impl.connect(Connector_impl.java:104)
    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:552)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getOSCAFactory(ServiceMgr.java:1)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getUnmanagedService_aroundBody16(ServiceMgr.java:654)
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getUnmanagedService(ServiceMgr.java:1)
    at com.crystaldecisions.enterprise.ocaframework.RawAPSDirectory.find(RawAPSDirectory.java:155)
    … 16 more
    Finished!

    Like

    Reply
  14. Wim

    Does anyone know what permissions/rights you need in BOBJ to be able to use the SDK / connect? They told me I can’t get it, since I need Administrator rights and an “Enterprise” type of login…. Does anybody have feedback? thnx

    Like

    Reply
  15. Rakhy

    Hello Dmytro,

    I have a task where I need to read data of a Webi Report, how can it be done?

    Basically I have a trigger report which runs every day and get the latest RACN number from the database. I am trying to get that RACN number from trigger report using BOBJ SDK.

    I really appreciate your suggestions on this.

    Regards,
    Rakhy.

    Like

    Reply
  16. Ravi Kanth

    Hi Dmytro,

    Can you please help me with the following requirement.

    I have a WEBI report which has multiple Tabs on it and now i want to schedule the Report and e-mail a Excel output with only few tabs on the report to the users.
    My user do not want to see ALL the tabs on the report, so i need to send only few tabs of the report to the users.

    Is there a way using SDK to accomplish the above requirement..??

    Note: My user do not want to create a Copy of the report with only required tabs which can be used for scheduling.

    Like

    Reply

Leave a comment