COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => SDK => Topic started by: larsonr on 23 May 2007 06:37:50 PM

Title: [SDK] Roles and User Manipulation
Post by: larsonr on 23 May 2007 06:37:50 PM
I figure I would bounce this off here to see if anyone is trying to do the same thing.  I've been working with Cognos Support but solutions aren't coming any time soon by the looks of it.

I have a Role that has an insane amount of users assigned to it that all need the same access.  I need to update this every night to be insynch with Active Directory edits from the prior day.  I can get this process to work when it is under 1000.  As of right now I have two roles that are assigned to the original role, each holding about 800 users just to get the process to work.   

Does anyone know of any limits to how many users can be updated to a role or group via the SDK?  Cognos says there shouldn't be, but when I go well over the thousand I hit a java null pointer exception on the update piece.

We've tried messing with the memory and running the script right on the machine in case it was a fire wall issue.

Any thoughts?
Title: Re: [SDK] Roles and User Manipulation
Post by: COGNOiSe administrator on 24 May 2007 08:57:32 AM
You are probably hitting a timeout issue. Large CAM queries can take long time to process. Increase timeout on your CRN Stub and you should be fine.
Title: Re: [SDK] Roles and User Manipulation
Post by: lloydke on 24 May 2007 09:16:03 AM
What version of Cognos are you using?  We have found that under 8.1.2 that we are limited to about 2000 users in a single role before the JVM core dumps.  In 8.2 that number went up to about 3800 before we had the JVM panic.

--Kevin
Title: Re: [SDK] Roles and User Manipulation
Post by: COGNOiSe administrator on 24 May 2007 11:16:00 AM
Did it scream anything when it panicked?
Title: Re: [SDK] Roles and User Manipulation
Post by: lloydke on 24 May 2007 02:49:59 PM
Yes, it screamed "I AM OUT OF MEMORY!!!"   ;D
Title: Re: [SDK] Roles and User Manipulation
Post by: COGNOiSe administrator on 26 May 2007 08:32:11 AM
Interesting ... I think I've ran fine with 10k some time ago, but I better double check ...
Title: Re: [SDK] Roles and User Manipulation
Post by: larsonr on 30 May 2007 08:33:18 PM
Solved... Turns out the Jvm needed to be allocated more memory.  Due to the nature of the objects and the defaults of my JVM, by allocating more mem at run time, it was able to handle request for the 1600 users.  Thank you all for the input. 

Title: Re: [SDK] Roles and User Manipulation
Post by: engineerairborne on 30 Apr 2008 03:47:11 PM
Just a question on this. If I understand your original question, you have to synch with what is in your active Directory every night. Would you not be better off, having active directy put all of these users into a group in AD, and then just add the AD Group to the Cognos Role? Then it would always be up to date with what is in AD.
Title: Re: [SDK] Roles and User Manipulation
Post by: larsonr on 21 May 2008 11:54:22 AM
That would be optimal, but since the team is pretty limited on the AD side, it was easier for us to implement.  They were also running with a heirarchy on Active Directory.  I wanted only the users at the leaf nodes which is where the complexity starting coming from.
Title: Re: [SDK] Roles and User Manipulation
Post by: Ty Clabbers on 22 May 2008 05:41:35 AM
Quote from: larsonr on 30 May 2007 08:33:18 PM
Solved... Turns out the Jvm needed to be allocated more memory.
I know I am a java/JVM newbe but just wondering, can you manually allocate more memory to a JVM process? If so, how. I think this could be a sollution to another problem I am having with SDK.
Title: Re: [SDK] Roles and User Manipulation
Post by: larsonr on 23 May 2008 03:18:48 PM
Unforuntately from what I know about java you can't do it directly within your code.  You have to tell it do it within the call to your Jar file. For example if you're needing to kick something off from the command line you would do something like this --

java -Xms300m -Xmx300m -jar "Jarfilelocationandname"

where -Xms999m is your min memory allocation and -xmx999m is your max memory allocation.

If you want to test within your IDE, just refer to the IDE documentation on memory allocation.