cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BI 4.2 Semantic Layer SDK error extract universe metadata on Linux

0 Kudos
466

Hi, we are using the Semantic Layer SDK to extract the metadata of universes on Linux server, BI platform version 4.2 sp7

When we run the java class we get the following error: "com.sap.tools.commons.exception.NestedException: Interface requested not found : csLIB"

These are the params that we used:

export CLASSPATH=:.:/opt/sapbi/sap_bobj/enterprise_xi40/SL_SDK/java/sl_sdk.jar:/opt/sapbi/sap_bobj/enterprise_xi40/dataAccess/connectionServer/java/*

../java -Dbusinessobjects.connectivity.directory="/opt/sapbi/sap_bobj/enterprise_xi40/dataAccess/connectionServer" SampleConnection

This is the content of java class:

private static String USER_NAME = "XXXXXX";
private static String PASSWORD = "XXXXXX";
private static String CMS_HOST_NAME = "XXXXX:6400";
private static String UNIVERSE_CUID = "XXXXXXXX";
private static String AUT_MODE = "secEnterprise";
private static IEnterpriseSession enterpriseSession;
public static void main(String[] args) {
  try{
      enterpriseSession = CrystalEnterprise.getSessionMgr().logon(USER_NAME, PASSWORD, CMS_HOST_NAME, AUT_MODE);
      getMeasures();
      enterpriseSession.logoff();
  }catch(SDKException e){
      System.out.println("ERROR in main " + e.getMessage());
  }
}
private static void getMeasures() {
      SlContext context= SlContext.create();
      context.getService(CmsSessionService.class).setSession(enterpriseSession);
      CmsResourceService _cmsResourceService=context.getService(CmsResourceService.class);
      LocalResourceService _localResourceService = context.getService(LocalResourceService.class);
      String repositoryFolder = "/Universes/Samples/eFashion.unx";
      String localBlxPath =".";
      String retrieveUniverse = _cmsResourceService.retrieveUniverse(repositoryFolder, localBlxPath, true);
      RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) _localResourceService.load(retrieveUniverse);
      context.close();
}

Can you help us? Thanks in advance

View Entire Topic
daniel_paulsen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Corrado,

That error suggests your PATH variable is not set correctly,

Ensure that you are using 64bit Java and that your env.sh file has the following in the path:

<BI_Install_folder>/sap_bobj/enterprise_xi40/linux_x64/

Dan

0 Kudos

Hi Daniel, thanks for the reply.

We made the changes, using this script too, but the error still persists. We don't know what to do.

export BOBJ_JAVA_LIB=/opt/sapbi/sap_bobj/enterprise_xi40
export JAVA_HOME=/opt/sapbi/sap_bobj/enterprise_xi40/linux_x64/sapjvm
export CURRENT_DIR=%cd%

echo Using JAVA_HOME: ${JAVA_HOME}
echo Using CURRENT_DIR: ${CURRENT_DIR}

export _RUNJAVA="${JAVA_HOME}/bin/java"
export _RUNJAVAC="${JAVA_HOME}/bin/javac"
export _RUNJAR="${JAVA_HOME}/bin/jar"

export CLASSPATH=.:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_celogon.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_corba.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_core.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_ex.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_java.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_lib.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_logging.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_seccred.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_sso.jar:${BOBJ_JAVA_LIB}/dataAccess/connectionServer/java/cs_tools.jar:${BOBJ_JAVA_LIB}/SL_SDK/java/sl_sdk.jar

export PATH=/opt/sapbi/sap_bobj/enterprise_xi40/linux_x64:${PATH}:

${_RUNJAVAC} -classpath "${CLASSPATH}" SampleConnection.java
${_RUNJAVA} -Dbusinessobjects.connectivity.directory="/opt/sapbi/sap_bobj/enterprise_xi40/dataAccess/connectionServer" -classpath "${CLASSPATH}" SampleConnection