on 2022 Apr 22 11:23 AM
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
Request clarification before answering.
is there a reason you added specific jars in the connectionserver directory to your classpath?
Some of those jars may contain classes that conflict with ones in the SL_SDK/java/sl_sdk.jar
to confirm, I would remove the connectionserver jars from the classpath and see if that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel, we removed all the connectionserver jars from the classpath, but the error still persists.
This is the complete error log:
Exception in thread "main" com.sap.tools.commons.exception.NestedException: Interface requested not found : csLIB
at com.sap.tools.commons.exception.NestedException.create(Unknown Source)
at com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder.getPRM(DataFoundationSQLDecoder.java:82)
at com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder.<init>(DataFoundationSQLDecoder.java:97)
at com.businessobjects.mds.services.parser.decoder.UniverseSQLDecoder.<init>(UniverseSQLDecoder.java:40)
at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.createSdkModel(MdsToSdkBusinessLayerConverter.java:246)
at com.sap.sl.sdk.authoring.businesslayer.internal.services.BusinessLayerModelToModel.createSdkModel(BusinessLayerModelToModel.java:31)
at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.createSdkBusinessLayer(LocalResourceServiceImpl.java:224)
at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.loadInternal(LocalResourceServiceImpl.java:203)
at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.load(LocalResourceServiceImpl.java:130)
at SampleConnection.getMeasures(SampleConnection.java:146)
at SampleConnection.main(SampleConnection.java:58)
Caused by: com.sap.connectivity.cs.core.CSError: Interface requested not found : csLIB
at com.sap.connectivity.cs.extended.ImplementationManager.getImplementation(ImplementationManager.java:151)
at com.sap.connectivity.cs.extended.ImplementationManager.getConfiguration(ImplementationManager.java:195)
at com.sap.connectivity.cs.extended.NLDBProvider.populateMap(NLDBProvider.java:49)
at com.sap.connectivity.cs.extended.NLDBProvider.getManager(NLDBProvider.java:159)
at com.sap.connectivity.cs.extended.Provider.getEnvironment(Provider.java:93)
at com.sap.connectivity.cs.extended.ConnectionServer.JobProfile(ConnectionServer.java:572)
at com.sap.connectivity.cs.api.trace.EnvironmentLogger.JobProfile(EnvironmentLogger.java:613)
at com.businessobjects.mds.services.relational.PrmProperties.getDbParameterSet(PrmProperties.java:1509)
at com.businessobjects.mds.services.relational.PrmProperties.loadFunctions(PrmProperties.java:1552)
at com.businessobjects.mds.services.relational.PrmProperties.loadParameters(PrmProperties.java:1526)
at com.businessobjects.mds.services.relational.PrmProperties.<init>(PrmProperties.java:185)
at com.businessobjects.mds.services.relational.CsService.getPRMProperties(CsService.java:1458)
at com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder.getPRM(DataFoundationSQLDecoder.java:80)
... 9 more
Caused by: java.lang.UnsatisfiedLinkError: no cs_jni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1966)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1134)
at com.sap.connectivity.cs.library.ConnectionServer.<clinit>(ConnectionServer.java:330)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forNameFW(Class.java:362)
at java.lang.Class.forName(Class.java:355)
at com.businessobjects.connectionserver.ConnectionServer.getImplementation(ConnectionServer.java:483)
at com.businessobjects.connectionserver.ConnectionServer.getInstance(ConnectionServer.java:134)
at com.sap.connectivity.cs.extended.ImplementationManager.getImplementation(ImplementationManager.java:144)
... 21 more
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.