cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.UnsupportedOperationException when loading local .blx

Former Member
0 Kudos

I looked all the posts that have a simmilar error but they all suggest to add this -Dbusinessobjects.connectivity.directory attribute.

I am using jdeveloper  I have added it an verified in the run log that java command has this directive. My error is as follows:


The code is:

Project classpath includes SL_SDK.jar  and

C:\PROJECTS\SL_PROJECT\bin\dataAccess\connectionServer\java\* (all the cs_*.jar files)

Also, the java argument is set like this

-Dbusinessobjects.connectivity.directory="C:\PROJECTS\SL_PROJECT\bin\dataAccess\connectionServer"

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

     // universePath =  “C:\STUFF\TMP\retrieval-2015-10-15-08-04-55\DART- Data Analytics & Reporting Tool.blx”

RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) service.load(universePath);

*Note* the computer this is running on remotely connects to BOBJ,  and uses

  1. cmsService.retrieveUniverse()

to retrieve the  universe files  .blx and .dfx etc

There is not actually a bobj installation on the machine so the folder C:\PROJECTS\SL_PROJECT\bin\dataAccess\connectionServer is just a copy of the folder from the installation directory.

Then I get error:

Exception in thread "main" 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:362)

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

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

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)

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

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

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

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

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

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

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

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

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

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

at gov.gnma.iopp.service.bobj.SL_TEST.useSemanticLayer(SL_TEST.java:184)

at gov.gnma.iopp.service.bobj.SL_TEST.main(SL_TEST.java:144)

Caused by: java.lang.NullPointerException

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

... 22 more

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

As far as I am aware of, you need a server or client to test your SL SDK application.You cannot copy the connectionServer folder to your workplace as there are internal dependencies which would break by a copy paste. If some one else have tried anything of this sort probably they can help, but as far as I know try installing client on your machine and test.

Thanks,

Prithvi

Former Member
0 Kudos

Which client is required for sdk?

So does this mean that it is not possible to write a standalone program with the just SDK that can perform the functions of the SL SDK?

Former Member
0 Kudos

Installing IDT would help as you can also validate your results. As far as I am aware, I have seen a similar issue with one of my customer and we were not able to run SL Sdks without the client or server. I haven't got any chance to test further on that so can't comment much. Probably if I can find a machine, I would test your workflow and let you know if I find anything interesting.

Thanks,

Prithvi

Former Member
0 Kudos

Ok. So is the same issue for other SDK?

I keep getting errors trying to get documents also. I found some code that has references some API to retrieve objects in a report and I found this link

Java code to list the objects used in a Webi 4.0 document

It uses classes like IDocumentInstanceManagementService  and IDocumentInstance  that i cant find documentation for anywhere.

Does this type of thing require to have IDT also?

Former Member
0 Kudos

No, only SL Sdks require as it requires configuring connectionServer directory under vm arguments which gets created only on server/client installation.

Rest all java sdks can run independently with out having client installed on local machine if you have the required jars in your applications classpath.

Former Member
0 Kudos

You can find all the documentation related to SDKs at http://help.sap.com. Steps given in below snapshot. Refer to development Information.

Former Member
0 Kudos

I installed the local version of client tools. Pointed it to that directory and still i get the same issue.

I am not quite sure what that connection server is supposed to do. i am writing a program to retrieve a blx file and access its contents. I was already able to retrieve the file through  CMS remotely from the server that actually has bobj installed. Why do i need anything locally? Does something have to be running??

Also, i read somewhere there is a difference berween 32 and 64 bit but there is only a 32 bit version of the client tool it seems.

Former Member
0 Kudos

Hi Martin,

We need the client tools as it includes the dependencies to build the universes locally (such as creation/modification/deletion of business layer, data foundation layer & connection layer).

We can perform almost all of the workflow of Information Design Tool using Semantic Layer Java SDKs (in an automated fashion).

As IDT & Semantic Layer Java SDKs, both are Java based client tools & needs the following two settings surely:

1. Setting VM arguments to point the connection server directory:

    -Dbusinessobjects.connectivity.directory="<bip-install-dir>\SAP BusinessObjects

Enterprise XI 4.0\dataAccess\connectionServer"

2. Set the PATH environment variable to the Connection Server binaries directory:

    PATH=<bip-install-dir>\SAP BusinessObjects Enterprise XI 4.0\win32_x86;

Also the jar that you are using in the classpath to run the SL SDK application i.e. sl_sdk.jar, which is present at the location: <bip-install-dir>\SAP BusinessObjects Enterprise XI 4.0\SL SDK\java, also contains the relative references of other jar files in their MANIFEST.MF file.

You will never face any issues while retrieving the UNX universe from repository, as it doesn't need the VM arguments & PATH environment variables for execution through SLSDK. However if you are performing any other operation like loading business layer, data foundation layer locally needs the VM arguments & PATH environment declaration.

Regarding the Java code to list the objects used in a Webi 4.0 document blog, the piece of code uses two internal JAR files, whose documentation is not available & also not recommended to use, as those JAR files for AnalyticalReporting bundled web-application. The piece of code that you are referring is merely just a workaround for getting the objects used in webi documents, also it is using a separate component of SDKs i.e. BusinessObjects Enterprise(Platform) Java SDKs & it doesn't needs any client installation.

The only supported & recommended way for getting the details from a UNX universe is through Semantic Layer Java SDKs/Semantic Layer REST Web services SDKs.

Hope the above points will clarify your doubts.

Thanks,

Shailendra

Former Member
0 Kudos

Thanks Shailendra but th REST api is very rudimentary and does not return any of that information. You cant see the expression (table.column) that an object in the universe maps to and you can't see what obejcts are in a report. The specification is the best bet and it only gives you end object names but if you have several data providers with objects of the same name you can't  tell which is which - that is if you can parse them all out of the XML correctly,

The SL java sdk is more promising but after doing all that you suggested .. again .. it still does not work. I still fail to understand what the purpose of an API is if i  need to fully install some other software to use it. ?