Hi all,
I encountered one issue in the process of semantic layser BO SDK development, where i want to update existed connection resouce in CMS.
It is a bit like the featuer provided by sample codes enclosed with semantic layer SDK package.
the code is listed as below
context = SlContext.create();
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(bo_username,
bo_password, bo_cms_name, bo_auth_type);
context.getService(CmsSessionService.class).setSession(enterpriseSession);
// Creates the CmsResourceService service
CmsResourceService service = context.getService(CmsResourceService.class);
System.out.println(CmsResourceService.CONNECTIONS_ROOT);
System.out.println(CmsResourceService.CONNECTIONS_ROOT + existed);
// Loads the connection to edit
DatabaseConnection connection = null;
try {
connection = service.loadConnection("/Connections/OSS_TEL_Instance3");
//service.
} catch (SlException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
once it run, the error message poped up
Exception in thread "main" java.lang.IllegalArgumentException: Invalid network layer: JDBC
at com.sap.sl.sdk.authoring.connection.internal.RelationalDriverFactory.getRelationalDriver(RelationalDriverFactory.java:116)
at com.sap.sl.sdk.authoring.connection.internal.RelationalDriverFactory.createSdkConnection(RelationalDriverFactory.java:66)
at com.sap.sl.sdk.authoring.cms.internal.services.CmsResourceServiceImpl.loadConnection(CmsResourceServiceImpl.java:511)
at try_sl_sdk.ConnectionModification.changeConnectionURL(ConnectionModification.java:110)
at try_sl_sdk.ConnectionModification.main(ConnectionModification.java:72)
Notice, i have added VM arguments as the SDK develoment guide and switch the JDK to 32-bit version.