SAP BusinessObjects

SAP BI Semantic Layer: Changes and errors on SAP BO 4.2 SP4

It’s been a long time since the last time I posted on the Blog. A lot of things have changed during this month and a half. Anyway, I wanted to write about a problem I had during the last few days while programming a Java application for working with a SAP BusinessObjects system using the BI Semantic Layer Java SDK. The BI Semantic Layer is a cool way for working with a BO system using Java or .Net programming language. You can use it on a JSP webpage or create a .jar file and execute it from the operating system. It basically allows you to perform almost any action as you were working with the CMC and BI Launchpad on the Web Browser.

The problem is that SAP changed a lot of things on the Support Package 4 for SAP BusinessObjects 4.2. They basically changed the Java libraries used in the authentication against the SAP Business Objects. Because of this if you have an old java application working against the BO system it just stopped working. The SAP Note 2433337 – Security enhancements in SAP BusinessObjects BI Platform 4.2 SP04 described this change:

You basically have to copy the new libraries from the folder <INSTALL_DIR>\SAP BusinessObjects Enterprise XI 4.0\java\lib\ and include them in the Bundle Library in Eclipse. I tried hundred of times and the same errors appeared over and over again…

Toolkit not encapsulated by a jar

This error is described in the SAP Note 2514323 – BI SDK: com.rsa.crypto.CryptoException: java.lang.SecurityException: java.lan g.SecurityException: Toolkit not encapsulated by a jar and apparently there is no solution.  It happens when you use the following options:

  • Extract required libraries into generated JAR.
  • Package required libraries into generted JAR while exporting to the jar file.

The solution is quite easy, instead of using these option just select the option Copy required libraries into a sub-folder next to the generated JAR.

Required option when exporting in Eclipse

This is kind of bad because you will have a huge folder of about 200MB of libraries… At least the application will work until SAP fix the issue!

Could not initialize class com.businessobjects.bcm.BCM

In this case the solution is to copy the jar files included in <INSTALL_DIR>\SAP BusinessObjects Enterprise XI 4.0\java\lib\ and <INSTALL_DIR>\SAP BusinessObjects Enterprise XI 4.0\java\lib\external and replace the old jar libraries in the Bundle Library in Eclipse. For authenticating against the CMS I used the following java code:

IEnterpriseSession enterpriseSession = null;
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authType);
IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

Just remember to initialize the variables username, password, cmsname and authType before. I tried different options but this was the one that worked correctly.

Learning SAP BO Semantic Layer SDK

I leave you some links that you can use about SAP BO SDK:

SAP BusinessObjects BI Platform Help: Check the Development section, there are a lot of guides about BIP RESTful Web Services, Semantic Layer, etc.

SAP BusinessObjects BI 4.x – Developer SDK Library: Different examples about how to use the SAP BO SDK.

Mike

Share
Published by
Mike

Recent Posts

DevOps, Infrastructure as Code and SAP

I hope you all survived the log4j Apocalypse and Christmas, hopefully you had a great…

2 years ago

Log4Shell Critical vulnerability

I know it is being a while since I posted the last time. So far…

2 years ago

Adobe Acrobat Reader Security Update causing issues with SAPGUI

UPDATE 11/25/2020 Adobe released a new patch that solves the issue a few days ago:…

3 years ago

SAP GUI 7.70 Preview: They will know me as Quartz

Good news for you fanatics of SAP GUI! SAP will release SAP GUI 7.70 in…

4 years ago

Preparing the SAP Cloud Consultant Interview

Quick update since I don't have a lot of time lately. During my 2019 job…

4 years ago

It's the final countdown (2019 Edition)

It's been a while since the last time I wrote an entry in my blog.…

4 years ago