cancel
Showing results for 
Search instead for 
Did you mean: 

creating an object using Semantic Java SDK

Former Member
0 Kudos


Hi,

I would like to know how to use Semantic Java SDK to create an object in efashion universe in BO 4.1

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor
0 Kudos

There are samples that ship with BOE that demonstrate how to do this (create a business layer item)

importing and using the samples is documented here: BI Semantic Layer Java SDK Developer Guide

After opening the Samples, look for the "CreateUniverseTest.java" sample and the "createBlItem()" method.

Note to use the SL SDK, you will need to convert efashion.unv to efashion.unx

I hope this helps,

Dan

Former Member
0 Kudos

Hi,

Thanks, I have BO 4.1 server trial installed on my sytem , I tried to look for  com.sap.sl.sdk.authoring.samples.source.jar as mentioned in link provided above and I can see this jar file  in "Progem Files(x86)\SAP Business Objects\SAP Business Objects Enterprise XI 4.0\SL SDK"

Do I need to open this jar file to look for "CreateUniverseTest.java",? I am not sure how to open this file to see content

daniel_paulsen
Active Contributor
0 Kudos

The documentation explains how to import the jar into eclipse.  This will extract all of the samples.

Alternatively, you could open the jar with winrar and browse to the file in winrar and select "view file" from within winrar. (you may have to change the extension to .Zip).

Dan

Former Member
0 Kudos

Thanks, I am able to see sample java code in "CreateUniverseTest.java", if I write java code to create an object based on sample, save it in xyz.jar file and execute in java enviorment on my system, will this create an object in efashion universe on server ?

daniel_paulsen
Active Contributor
0 Kudos

Yes, it should, provided your code follows the same workflow you would use to do the same in the Information Design Tool. (copy local, modify, save, publish back to CMS)

Dan.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi , I am using CreateUniverseTest.java sample for creating sample universe on BO 4.1

I am able to create MS Sql Server 2008 connection but getting below failure traces while creating data foundation layer, I do not have SQL Server 2008 installed on my system

com.sap.tools.commons.exception.NestedException: com.microsoft.sqlserver.jdbc.SQLServerDriver

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

  at com.sap.sl.sdk.authoring.samples.CreateUniverseTest.createUniverse(CreateUniverseTest.java:144)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

  at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

  at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)

  at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Caused by: com.sap.connectivity.cs.java.drivers.CSDriverError: com.microsoft.sqlserver.jdbc.SQLServerDriver

  at com.sap.connectivity.cs.java.drivers.DDKExceptionImpl.convertToCSException(DDKExceptionImpl.java:156)

  at com.sap.connectivity.cs.java.JAVAGenericJob.<init>(JAVAGenericJob.java:75)

  at com.sap.connectivity.cs.java.JAVADictionary.<init>(JAVADictionary.java:28)

  at com.sap.connectivity.cs.java.JAVAOpenDictionary.<init>(JAVAOpenDictionary.java:41)

  at com.sap.connectivity.cs.java.JAVARDBMSDictionary.<init>(JAVARDBMSDictionary.java:40)

  at com.sap.connectivity.cs.java.RDBMSDictionary.<init>(RDBMSDictionary.java:52)

  at com.sap.connectivity.cs.java.ConnectionServer.getDictionary(ConnectionServer.java:422)

  at com.sap.connectivity.cs.core.ConnectionServer.CreateDictionary(ConnectionServer.java:234)

  at com.sap.connectivity.cs.api.trace.EnvironmentLogger.CreateDictionary(EnvironmentLogger.java:1721)

  at com.sap.connectivity.cs.extended.ConnectionServer.CreateDictionary(ConnectionServer.java:1025)

  at com.sap.connectivity.cs.api.trace.EnvironmentLogger.CreateDictionary(EnvironmentLogger.java:1721)

  at com.businessobjects.mds.services.relational.CsService.createSafeDictionary(CsService.java:628)

  at com.businessobjects.mds.services.relational.CsService.createDictionary(CsService.java:607)

  at com.businessobjects.mds.services.relational.SolverCsProvider.getDictionary(SolverCsProvider.java:90)

  at com.businessobjects.mds.services.relational.CsService.getConnectionInfo(CsService.java:854)

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

  ... 26 more

Caused by: com.sap.connectivity.cs.java.drivers.DDKExceptionImpl: com.microsoft.sqlserver.jdbc.SQLServerDriver

  at com.sap.connectivity.cs.java.CSError.getInstance(CSError.java:49)

  at com.sap.connectivity.cs.java.ErrorManager.getError(ErrorManager.java:130)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.getJDBCDriver(JDBCDriver.java:1019)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.createJavaJDBCConnection(JDBCDriver.java:1223)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.createCSJDBCConnection(JDBCDriver.java:1200)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.createConnection(JDBCDriver.java:1161)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.connect(JDBCDriver.java:1385)

  at com.sap.connectivity.cs.java.JAVAGenericJob.<init>(JAVAGenericJob.java:71)

  ... 40 more

Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

  at java.net.URLClassLoader$1.run(Unknown Source)

  at java.net.URLClassLoader$1.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.net.URLClassLoader.findClass(Unknown Source)

  at java.lang.ClassLoader.loadClass(Unknown Source)

  at java.lang.ClassLoader.loadClass(Unknown Source)

  at java.lang.Class.forName0(Native Method)

  at java.lang.Class.forName(Unknown Source)

  at com.sap.connectivity.cs.java.drivers.jdbc.wrapper.JDBCWrapper.initialize(JDBCWrapper.java:45)

  at com.sap.connectivity.cs.java.drivers.jdbc.JDBCDriver.getJDBCDriver(JDBCDriver.java:1014)

  ... 45 more