cancel
Showing results for 
Search instead for 
Did you mean: 

Semantic Layer Java SDK in local machine without BO Client

Former Member
0 Kudos

Hi, 

I am using Bo4.1 sp3.I am working on semantic layer java Sdk in Eclipse IDE .

Whether can we work semantic layer Java sdk using Eclipse in local machine without BO Client? 

I tried in eclipse without Bo client,I got the below error.

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:81)

at com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder.<init>(DataFoundationSQLDecoder.java:96)

at com.businessobjects.mds.services.parser.decoder.UniverseSQLDecoder.<init>(UniverseSQLDecoder.java:40)

at com.businessobjects.mds.services.parser.EncodeDecodeHelper.decodeExpression(EncodeDecodeHelper.java:301)

at com.businessobjects.mds.services.helpers.BindingHelper.decodeExpression(BindingHelper.java:250)

Can anyone help.

Regards,

Kavitha S

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kavitha,

Could you let me know if your issue was resolved and are able to get the metadata information?

I was trying the same and was not able to achieve.

Former Member
0 Kudos

Hi Gopinath,

Without Bo client you cant extract metadata in local machine.

You should have Bo client in your machine.

With Bo client only i extracted metadata using semantic layer.

Regards,

kavitha S

Former Member
0 Kudos

Thanks Kavitha,

I have tried what ever you and Prithvi has given so far, but I'm getting the following error when I execute.

Exception in thread "main" com.sap.sl.sdk.authoring.internal.AuthoringException: The extension type blx of the resource D:\Universe\retrieval-2014-08-25-05-25-12\salesabc.blx is not supported. (SLS 21000)

    at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.retrieve(LocalResourceServiceImpl.java:362)

    at com.str.universe.TestUniverse.main(TestUniverse.java:45)

I'm using BO 4.1 sp2, installed client (version x64) on my local machine where my eclipse was also there.

Please suggest me.

Thanks,

Gopi

Former Member
0 Kudos


Hi Gopinath,

I dint face this error.

You check whether  BO client installed properly and check you included jars and VM arguments correctly?

What eclipse and java version your using?

Check your version whether it is correct with below version

Regards,

Kavitha S

Former Member
0 Kudos

I'm using Eclipse 3.7 and Java 1.6, not sure why I'm getting this error.

Prithvi,

Could you please let me know your thoughts on the error that I'm facing.

Thanks,

Gopi

Former Member
0 Kudos

Hi Gopi,

Can you please describe the steps you have executed as well as the code you are using. Please specify the line you are getting the error?

Thanks,

Prithvi

Former Member
0 Kudos

I'm using Eclipse Indigo (3.7) and Java 1.6,


- i have setting the VM Arguments -Dbusinessobjects.connectivity.directory="C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer".

- i have Declared a new environment variable path specific to the java class and point it to the location C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

BO version 14.1.4

I got the below error when retrieve the universe from server



java.lang.IncompatibleClassChangeError: Found interface com.businessobjects.mds.repository.ResourceID, but class was expected] with root cause

java.lang.IncompatibleClassChangeError: Found interface com.businessobjects.mds.repository.ResourceID, but class was expected

  at com.sap.sl.sdk.authoring.cms.internal.right.RetrieveUniverseFileRight.isAllowed(RetrieveUniverseFileRight.java:27)

Can anyone help.

Regards,

Emiliano

Former Member
0 Kudos

Hi Experts

i am creating the uinverse but i am facing issue while creating the datafondation and adding the tables to datafoundation.Please help me out from this.my code is given below  

package WebI;

import com.crystaldecisions.sdk.framework.CrystalEnterprise;

import com.crystaldecisions.sdk.framework.IEnterpriseSession;

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

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

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

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

import com.sap.sl.sdk.authoring.datafoundation.DataFoundationFactory;

import com.sap.sl.sdk.authoring.datafoundation.DatabaseTable;

import com.sap.sl.sdk.authoring.datafoundation.MonoSourceDataFoundation;

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

import com.sap.sl.sdk.authoring.samples.util.AuthenticationMode;

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

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

public class CreateUnx {

  /** CMS System */

    private static final String CMS_LOG_HOST = "172.25.121.127";

    /** User name used to log in to the CMS */

    private static final String CMS_LOG_USER = "Administrator";

    /** User password */

    private static final String CMS_LOG_PASS = "Password123";

    /** Authentication mode used to log in to the CMS. Here: Enterprise */

    private static final String CMS_AUTH_MODE = AuthenticationMode.ENTERPRISE;

   /* *//** Database Host name *//*

    private static final String CNX_DATASOURCE = "RLA_dbcognos_BO";

    */

    /** Local folder used to save all resources locally */

   // private static final String LOCAL_FOLDER = System.getProperty("java.io.tmpdir");

   

    private static final String LOCAL_FOLDER ="F:\\Data_Foundation(Cnx)\\";

   

  

    /** Database Host name */

    private static final String CNX_DATASOURCE = "172.25.121.105";//172.25.121.105

    /** Database Owner */

    private static final String CNX_OWNER = "SPL_Warehouse";//AdWorks

    /** Database Qualifier */

    private static final String CNX_QUALIFIER = "AdventureWorksDW.dbo";

    /** Database Database */

    private static final String CNX_DATABASE = "AdventureWorks";//AdventureWorks

    /** Database User name */

    private static final String CNX_USER = "sa";//sa

    /** Database User password */

    private static final String CNX_PASS = "Password123";//Password123

   

    private static final String CNX_DATASOURCE_NAME= "AdventureWorks";

    private static final String connName= "AdventureWorks";//"Adworks_new_SLA" ;

    //

    // !! End of parameters definition !!

    //

    public static void main(String[] args) {

  

  SlContext context;

      IEnterpriseSession enterpriseSession;

      DataFoundationFactory dataFoundationFactory;

      DataFederatorService dataFederatorService;

    LocalResourceService localResourceService;

    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";

  String dburl = "jdbc:odbc:RLA_dbcognos_BO";

  java.sql.Connection dbconn;

  

     try {

  

        // Connects to the CMS and creates a session

        context = SlContext.create();

      

        enterpriseSession = CrystalEnterprise.getSessionMgr().logon(CMS_LOG_USER, CMS_LOG_PASS, CMS_LOG_HOST, CMS_AUTH_MODE);

        System.out.println(""+CMS_LOG_HOST);

       

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

        dataFoundationFactory = context.getService(DataFoundationFactory.class);

        dataFederatorService = context.getService(DataFederatorService.class);

        localResourceService = context.getService(LocalResourceService.class);

          System.out.println("dataFoundationFactory"+dataFoundationFactory);

          System.out.println("dataFederatorService"+dataFederatorService);

          System.out.println("localResourceService"+localResourceService);

       

         

        // Closes the CMS session

        //context.close();

        //enterpriseSession.logoff();

            System.out.println("\n- Create new connection");

        ConnectionFactory connectionFactory = context.getService(ConnectionFactory.class);

        //System.out.println(""+connectionFactory);

        RelationalConnection connection = connectionFactory.createRelationalConnection(connName, "MS SQL Server 2008", "ODBC Drivers");

       // System.out.println(""+connection);

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

      //  System.out.println(""+connection);

        //connection.getParameter("DATABASE").setValue(CNX_DATABASE);

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

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

      

     // Saves the connection locally

        System.out.println(String.format("\n\t- Save connection locally into \"%sSPL_Warehouse.cnx\"", LOCAL_FOLDER));

        //LocalResourceService localResourceService = context.getService(LocalResourceService.class);

        localResourceService = context.getService(LocalResourceService.class);

        localResourceService.save(connection, LOCAL_FOLDER + "SPL_Warehouse.cnx", true);

        System.out.println("save the connection locally");

       

        // Publishes the connection to a CMS and retrieves a shortcut

        System.out.println(String.format("\n\t- Publish connection into \"%s/SPL_Warehouse.cnx\" and retrieve a shortcut", CmsResourceService.CONNECTIONS_ROOT));

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

        String cnxCmsPath = cmsResourceService.publish(LOCAL_FOLDER + "SPL_Warehouse.cnx", CmsResourceService.CONNECTIONS_ROOT, true);

        String shortcutPath = cmsResourceService.createShortcut(cnxCmsPath, LOCAL_FOLDER);

        System.out.println("create"+shortcutPath);

       

        //

        // ** Single-source Data Foundation creation

        //

        System.out.println("\n- Create new data foundation");

         dataFoundationFactory = context.getService(DataFoundationFactory.class);

        MonoSourceDataFoundation dataFoundation = dataFoundationFactory.createMonoSourceDataFoundation("SPL_Warehouse", shortcutPath);

       

        // Adds tables to the data foundation

       /* System.out.println("\n\t- Add tables PURCHASE, PRODUCT, CUSTOMER_CALL, CUSTOMER, SO_HEADER");

       DatabaseTable purchaseTable = dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "PURCHASE", dataFoundation);

        DatabaseTable productTable = dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "PRODUCT", dataFoundation);

       */

        System.out.println("\n\t- Add tables DimProduct,DimProductCategory, DimProductSubcategory");

        DatabaseTable dimProductCategoryTable = dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "DimProductCategory", dataFoundation);

         //DatabaseTable productTable = dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "PRODUCT", dataFoundation);

        System.out.println("db"+dimProductCategoryTable);

        dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "DimProductSubcategory", dataFoundation);

        dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "DimProduct", dataFoundation);

      //  dataFoundationFactory.createDatabaseTable(CNX_OWNER, CNX_QUALIFIER, "SO_HEADER", dataFoundation);

       

       

  }

  catch(Exception ae)

  {

  System.out.println("Exception"+ ae);

  ae.printStackTrace();

  }

  }

}

error

172.25.121.127

dataFoundationFactorycom.sap.sl.sdk.authoring.datafoundation.internal.services.DataFoundationFactoryImpl@6ecd2c

dataFederatorServicecom.sap.sl.sdk.authoring.cms.internal.services.DataFederatorServiceImpl@dd3f78

localResourceServicecom.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl@17455ed

- Create new connection

  - Save connection locally into "F:\Data_Foundation(Cnx)\SPL_Warehouse.cnx"

save the connection locally

  - Publish connection into "/Connections/SPL_Warehouse.cnx" and retrieve a shortcut

createF:\Data_Foundation(Cnx)\retrieval-2016-04-11-16-47-58\AdventureWorks.cns

- Create new data foundation

  - Add tables DimProduct,DimProductCategory, DimProductSubcategory

Exceptioncom.sap.sl.sdk.authoring.internal.AuthoringException: The database table is not valid. (SLS 11004)

com.sap.sl.sdk.authoring.internal.AuthoringException: The database table is not valid. (SLS 11004)

  at com.sap.sl.sdk.authoring.datafoundation.internal.services.DataFoundationFactoryImpl.createDatabaseTable(DataFoundationFactoryImpl.java:183)

  at WebI.CreateUnx.main(CreateUnx.java:141)

Caused by: java.lang.IllegalArgumentException: "SPL_Warehouse"."AdventureWorksDW.dbo"."DimProductCategory"

  at com.businessobjects.mds.services.helpers.DataFoundationHelper.createSQLTable(DataFoundationHelper.java:1640)

  at com.sap.sl.sdk.authoring.datafoundation.internal.services.DataFoundationFactoryImpl.createDatabaseTable(DataFoundationFactoryImpl.java:180)

  ... 1 more

.

Former Member
0 Kudos

Hi Kavitha,

For running an application for SL SDKs, you require to set the below settings, without which you will not be able to run the application from ecllipse.

  • Browse to the sl_sdk.jar file located in the <slsdk-install-dir>\java directory.
  • Go for Run->Run Configurations->Arguments->VM Arguments. Define the location of your connection server such as -Dbusinessobjects.connectivity.directory="C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer".
  • Go for Run->Run Configurations->Environment. Declare a new environment variable path specific to the java class & point it to the location C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86 which contains all the BusinessObjects DLL to make the communication between UNX universe to the database.
  • Build & Clean your project & run your application once again.

Above for performing the 2nd and 3rd point, those path you get on your local environment, if you have the Client or server installed on your machine.

The error message you getting is because you have not specified the path variable in your ecllipse for the SL application.

I am not sure how you would point to those directories if you do not have the BO Client installed on your machine.

Thanks,

Prithvi

Former Member
0 Kudos

Hi Prithviraj,

Thanks for your information.

I tried in local machine,without BO client its not working.

Regards,

Kavitha S

Former Member
0 Kudos

Can you let us know what steps you have tried?

As far as I know as previously suggested, you would require the Client on your machine to run the code.

And what is the error you getting.

Thanks,

Prithvi

Message was edited by: Prithviraj Shekhawat

Former Member
0 Kudos

Hi Prithviraj,

I copied slsdk jar,data access/connection server folder and win32_x86 from Bo client

and pasted in my local machine.

I am getting the same above error.Without Bo client SL_SDK is not working.

some issues in installing Bo client in local machine.so i am working in server.

Regards,

Kavitha S

Former Member
0 Kudos

Hi Kavitha,

Copying the folders to your local machine is not the right way of going about it.

There is internal referrence to the servers from the folders and there are dependent dlls as well.

You would require the Client to be installed to have the mappings in a correct way.

I cannot think of an alternate way apart from having the server or client installed.

Thanks,

Prithvi

Message was edited by: Prithviraj Shekhawat

Former Member
0 Kudos

Hi

Thanks prithvi for your information.

Regards,

kavitha S

Former Member
0 Kudos

Hi Prithvi,

I developed a Java web application using semantic layer SDK to retrieve Universe metadata information.

  • I've added all the connectionserver jars and slsdk\eclipse\plugin jars to the project.
  • Added VM arguments in Run configurations
  • Declared a environmental variable pointing to the location C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

Now the project is running fine on the eclipse and exporting the universe metadata information to excel.

When i export the whole project into .war file and deployed the .war file in tomcat server in local machine, it gives me the following exception when Retrieving the universe from repository,

java.lang.UnsupportedOperationException

   at com.businessobjects.connectionserver.ConnectionServer.getInstance(ConnectionServer.java:165)

   at com.businessobjects.connectionserver.ConnectionServer.getInstance(ConnectionServer.java:100)

   at com.businessobjects.mds.services.relational.CsService.<init>(CsService.java:368)

   at com.businessobjects.mds.services.solver.AbstractConnectionSolver.getCSService(AbstractConnectionSolver.java:180)

   at com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder.getPRM(DataFoundationSQLDecoder.java:80)

   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.businessobjects.mds.services.parser.EncodeDecodeHelper.decodeExpression(EncodeDecodeHelper.java:303)

   at com.businessobjects.mds.services.helpers.BindingHelper.decodeExpression(BindingHelper.java:250)

   at com.businessobjects.mds.services.helpers.BindingHelper.decodeResultExpression(BindingHelper.java:264)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.getResultExpression(MdsToSdkBusinessLayerConverter.java:371)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.copyBusinessItemProperties(MdsToSdkBusinessLayerConverter.java:326)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.createSdkItem(MdsToSdkBusinessLayerConverter.java:275)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.copyMdsToSdk(MdsToSdkBusinessLayerConverter.java:227)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.copyMdsToSdk(MdsToSdkBusinessLayerConverter.java:234)

   at com.sap.sl.sdk.authoring.businesslayer.internal.services.MdsToSdkBusinessLayerConverter.createSdkModel(MdsToSdkBusinessLayerConverter.java:153)

   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:191)

   at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.loadInternal(LocalResourceServiceImpl.java:170)

   at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.load(LocalResourceServiceImpl.java:131)

   at org.apache.jsp.Export_005fUniverse_jsp._jspService(Export_005fUniverse_jsp.java:589)

   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)

   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)

   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)

   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)

   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)

   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)

   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)

   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)

   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

   at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

   at com.businessobjects.connectionserver.ConnectionServer.getInstance(ConnectionServer.java:151)

   ... 46 more


Please help me in how to deploy the war file in local machine.


Thanks and Regards,

Preethi

Former Member
0 Kudos

Do you have client installed ion your local machine?

Former Member
0 Kudos

Hi Prithvi,

No client is installed in local machine.

I tried deploying the war file in a server where both server and client is installed but it gives me the same exception.

Please help.

Thanks,

Preethi

Former Member
0 Kudos

Hi Prithvi,

Anything else i need to add while creating a war file?

Please let me know how to deploy this war file?

Thanks and Regards,

Preethi

Former Member
0 Kudos

I can only think of setting java options for app server to specify the connection server directory path.

-Dbusinessobjects.connectivity.directory="<bip-install-dir>\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer"

Thanks,

Prithvi