Quantcast
Channel: SCN : Popular Discussions - Java SDK Application Development
Viewing all articles
Browse latest Browse all 1701

Java exception when loading the local business layer

$
0
0

Hi Expert

 

I met a java exception when I want to load the local business layer, the client version is BO4.0SP06.

my code as below:

//get login information(username,password,server etc.) from samples.properties file.

                    Properties properties = SamplesUtilities.getSampleParameters("samples.properties");

                    //create context with session

                    SlContext context = SamplesUtilities.createContextWithSession(properties);

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

 

                    //Retrieve Universe from server

                    String path;

                    path = service.retrieveUniverse("/Universes/AAD_TEST.unx", "c:/", true);

                    System.out.println("in the path: \"" + path + "\"");

 

                    //get local Resource Service

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

                    //load business layer retrieved from server

                    RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) servicel.load(path);

 

                    //output the description of business layer.

                    String desc = businessLayer.getDescription();

                    System.out.println(desc);

 

when I run it in eclipse, I met a exception on step: RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) servicel.load(path);

the exception information as belwo:

Exception in thread "main" java.lang.UnsupportedOperationException: csEX

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

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

          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.decodeResultExpression(BindingHelper.java:242)

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

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

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

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

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

          at com.sap.sl.sdk.authoring.businesslayer.internal.services.BusinessLayerModelToModel.createSdkModel(BusinessLayerModelToModel.java:29)

          at com.sap.sl.sdk.authoring.local.internal.services.LocalResourceServiceImpl.createSdkBusinessLayer(LocalResourceServiceImpl.java:192)

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

          at com.sap.sl.sdk.authoring.samples.Test.main(Test.java:38)

Caused by: java.lang.UnsupportedOperationException: csEX

          at com.businessobjects.connectionserver.ConnectionServer.getImplementation(ConnectionServer.java:424)

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

          ... 17 more

Caused by: java.lang.ClassNotFoundException: com.sap.connectivity.cs.extended.ConnectionServer

          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

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

          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

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

          at java.lang.Class.forName(Class.java:266)

          at com.businessobjects.connectionserver.ConnectionServer.getImplementation(ConnectionServer.java:420)

          ... 18 more

 

I'm not sure if some SDK issue causes this error, please help to clarify.

 

Thanks!!!!!!!!!!!!!


Viewing all articles
Browse latest Browse all 1701


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>