cancel
Showing results for 
Search instead for 
Did you mean: 

Add user to BI platform is crashing the system using Java SDK

former_member185603
Active Contributor
0 Kudos

cbo-issuesbousersdkaddusersdk.txtWe are using Java SDK to add users to Business Objects. We build the java code as a class file. Here is the snippet where our code is failing. Please look at it and let me know if there is anything wrong we are doing. Same code works in PROD, but not in QA. only difference is System name, user we are using SDK to create users, has admin access in both the systems.

See the attached code

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member230921
Active Contributor

Please try to commit only user object and No other operations like setting preferences . Please try this simple code to create the user with the basic properties which were used in CMC before.

CreateUser.java

import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.plugin.desktop.user.IUser;


public class CreateUser {
	public static void main(String[] args) throws SDKException {
		try
		{
			ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
			ISessionMgr sessionManager = CrystalEnterprise.getSessionMgr();
			IEnterpriseSession enterpriseSession = sessionManager.logon("administrator", "Password1", "localhost", "secEnterprise");
			System.out.println("Logged into EnterpriseSession.....");
			IInfoStore infostore = (IInfoStore) enterpriseSession.getService("InfoStore");
			System.out.println("Got Infostore");
			IInfoObjects newUsers = infostore.newInfoObjectCollection();
			IUser newUser = (IUser) newUsers.add(IUser.KIND);
			newUser.setTitle("username");
			newUser.setNewPassword("password");
			newUser.setConnection(IUser.CONCURRENT);
			System.out.println("ready to commit");
			infostore.commit(newUsers);
			System.out.println("done");
			enterpriseSession.logoff();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
	}


}

Please share the exemptions with line.

former_member185603
Active Contributor
0 Kudos

Bharath,

Thanks for the sample java code. Since we have expertise in .net area, we are planning to use that. We got the sample code for .net , it is working for BI4, but not for BI3. We are getting error message, while trying to add users "Access denied. You cannot log on to an older version of the CMS".

We used the code from below. Link says, it should work for 3.1, but did not.

https://archive.sap.com/documents/docs/DOC-50603

daniel_paulsen
Active Contributor
0 Kudos

Hi Jawahar,

the source should be the same for BI4.x and 3.1. You cannot, however, reference 4.1 assemblies and log onto a 3.1 system. The application will have to reference 3.1 assemblies in order log onto a 3.1 system.

Dan

former_member185603
Active Contributor
0 Kudos

Where do I find the libraries for 3.1?

former_member230921
Active Contributor
0 Kudos

Is it failing in any specific case like high User list count? or Throwing any exceptions ?

How about creating Users in CMC and applying same preferences?

former_member185603
Active Contributor
0 Kudos

It is failing on first user itself where "Commit" in the code. if I manually add users in CMS it works fine.

com.crystaldecisions.sdk.exception.SDKServerException: An error occurred at the server :

All the servers with CMS :Server name>, cluster

Server name

and kind cms are down or disabled

cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2

detail:An error occurred at the server :

All the servers with CMS

Server name

, cluster

Server name

and kind cms are down or disabled

at com.crystaldecisions.sdk.exception.SDKServerException.map(Unknown Source)

at com.crystaldecisions.sdk.exception.SDKException.map(Unknown Source)

at com.crystaldecisions.sdk.occa.infostore.internal.InternalInfoStore.queryHelper(Unknown Source)

at com.crystaldecisions.sdk.occa.infostore.internal.InternalInfoStore.query(Unknown Source)

at com.crystaldecisions.sdk.occa.infostore.internal.at.query(Unknown Source)

at com.ari.createbouser.CreateBI4User.addUsers(CreateBI4User.java:159)

at com.ari.createbouser.CreateBI4User.main(CreateBI4User.java:60)

Caused by: com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2

at com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException.for(Unknown Source)

at com.crystaldecisions.enterprise.ocaframework.e.invoke(Unknown Source)

at com.crystaldecisions.sdk.occa.infostore.internal.am.queryEx3(Unknown Source)

... 5 more