Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Connection driver not found SLS 16000: Semantic Java SDK

Hi,

I am trying to create and publish connection on BO 4.1 server using Semantic Java SDK

I have 4.1 server installed on my system trial version and I have created ms access db but I am getting below error

Error:

Exception in thread "main" com.sap.sl.sdk.authoring.internal.AuthoringException: The connection driver "MS Access 2013/ODBC Drivers" is unknown. (SLS 16000)

  at com.sap.sl.sdk.authoring.connection.internal.RelationalDriverFactory.getRelationalDriver(RelationalDriverFactory.java:128)

  at com.sap.sl.sdk.authoring.connection.internal.services.ConnectionFactoryImpl.createRelationalConnection(ConnectionFactoryImpl.java:39)

  at connectionpackage.ConnectionClass.main(ConnectionClass.java:67)

Java Code:

package connectionpackage;

import com.sap.ip.bi.util.BiConsole.out;

import com.sap.sl.sdk.authoring.cms.CmsResourceService;

import com.sap.sl.sdk.authoring.cms.internal.right.SessionRight;

import com.sap.sl.sdk.authoring.connection.Connection;

import com.sap.sl.sdk.authoring.connection.DatabaseConnection;

import com.sap.sl.sdk.authoring.connection.DatabaseConnection.AuthenticationMode;

import com.sap.sl.sdk.authoring.connection.ConnectionFactory;

import com.sap.sl.sdk.authoring.connection.ConnectionParameter;

import com.sap.sl.sdk.authoring.connection.ConnectionService;

import com.sap.sl.sdk.authoring.connection.RelationalConnection;

import com.sap.sl.sdk.authoring.local.LocalResourceService;

import com.sap.sl.sdk.framework.SlContext;

import com.sap.sl.sdk.framework.cms.CmsSessionService;

import com.businessobjects.framework.*;

import com.crystaldecisions.sdk.exception.SDKException;

import com.crystaldecisions.sdk.framework.CrystalEnterprise;

import com.crystaldecisions.sdk.framework.IEnterprisePrincipal;

import com.crystaldecisions.sdk.framework.IEnterpriseSession;

import com.crystaldecisions.sdk.framework.EnterpriseVersion;

import com.crystaldecisions.sdk.framework.ISessionMgr;

import com.crystaldecisions.sdk.framework.internal.SessionMgr;

import com.crystaldecisions.sdk.properties.IProperties;

import com.businessobjects.dsl.framework.session.SessionManager;

  

  public class ConnectionClass {

  

  public static void main(String[] args) {

   IEnterpriseSession sess = null;

  

   try {

    sess = CrystalEnterprise.getSessionMgr().logon("administrator","password1", "INFBA03853.bglrodc.lntinfotech.com", "secEnterprise");

   

   out.println("logged on as: " );

   } catch (SDKException e) {

    // TODO Auto-generated catch block

    e.printStackTrace();

   }

  

   SlContext context;

   context = SlContext.create();

   context.getService(CmsSessionService.class).setSession(sess);

  

   CmsResourceService service = context.getService(CmsResourceService.class);

   String tempFolder = "c:\\temp\\";

  

   String userName = "username1"; // dbconnection.getParameter(DatabaseConnection.USER_NAME).getValue();

   String password = "password" ;

   String dbmsName = "MS Access 2013" ; //dbconnection.getParameter(DatabaseConnection.DBMS).getValue();

   String ntwkName = "ODBC Drivers" ; //dbconnection.getParameter(DatabaseConnection.NETWORK_LAYER).getValue();

   String connName = "test" ; //dbconnection.getParameter(DatabaseConnection.DATASOURCE).getValue();

   String dbName   = "Investor";

   String connectionName = "SDKTestRelationalConn";

    

   com.sap.sl.sdk.authoring.connection.ConnectionFactory connectionFactory;

  

   connectionFactory = context.getService(com.sap.sl.sdk.authoring.connection.ConnectionFactory.class);

  

   RelationalConnection connection = connectionFactory.createRelationalConnection(connectionName, dbmsName, ntwkName);

   connection.getParameter("DATASOURCE").setValue(connName);

   connection.getParameter("DATABASE").setValue(dbName);

   connection.getParameter("USER_NAME").setValue(userName);

   connection.getParameter("PASSWORD").setValue(password);

  

   com.sap.sl.sdk.authoring.local.LocalResourceService localResourceService = context.getService(com.sap.sl.sdk.authoring.local.LocalResourceService.class);

   localResourceService.save(connection, tempFolder + connectionName + ".cnx", true);

  

   service.publish(tempFolder  + connectionName + ".cnx", "/Connections" , true);

  }

}

Former Member
Not what you were looking for? View more on this topic or Ask a question