It's all about the answers!

Ask a question

Failed to disable email notifications using RTC API

Surender Biyyala (402048) | asked Jun 23 '14, 7:29 a.m.
I have requirement for disabling email for Bulk users.
The user information is in .txt file . I parsed it and stored data into array.

when I loop them and use RTC API to disable the mail notification it is getting stuck when Im half way through.
sometimes it is working fine for the same set of users.

did any one know what the reason behind this weird behaviour?


sam detweiler commented Jun 23 '14, 7:37 a.m.

can you tell us more what you are doing?

my sample code that code this from a file with a list of users is here
in the accepted answer

Surender Biyyala commented Jun 23 '14, 7:49 a.m.
Hi Sam,

Im using code which provided in the link.&nbsp; <div> When Im trying to execute it from eclipse it is working fine.

but when a make .exe and execute the command it is behaving strangely.
Sometimes it is working fine
Sometimes the problem is at Teamplatform.startup().
Sometimes it is getting stuck after parsing some users.


sam detweiler commented Jun 23 '14, 7:57 a.m.

that code has been run a few 1000 times.. I've never seen a hang like u describe.

the only place it could hang is in the read loop
but this is the normal pattern for read
                while((line = br.readLine()) != null)

then the next place is getting the contributor (user) info
                            IContributor contributor = icm.fetchContributorByUserId(userid, null);

the platform. startup & user hang, sounds like there is some rtc  or network issue.

Surender Biyyala commented Jun 23 '14, 8:40 a.m.

 Thanks for the clarification Sam.

I have a question here if there is some network issue then why is it working when I run the command from eclipse? Not even a single scenario is failed when I run the same from eclipse and is not working when accessing the .exe through command line.


sam detweiler commented Jun 23 '14, 8:47 a.m.

is a different set of RTC plain java libraries being used? 

did you build the .exe thru the eclipse export to runnable jar function?

I have not seen any difference between the two environments

Surender Biyyala commented Jun 23 '14, 8:57 a.m.

 We are using the correct RTC libraries. And I got the .exe through a maven build.

The following are the some of the observations I found.

I ran the command multiple(10) times and it is failing exactly after processing 33 users.

There are a batch of commands which are executed in sequence.I got the problem when processing the batch file. 
If i execute only that command then it is working fine.


sam detweiler commented Jun 23 '14, 8:59 a.m.


can u show/tell us about the other commands executed in the batch file?
What do they do?

Surender Biyyala commented Jun 23 '14, 9:01 a.m.

 The first one in the list is 

Switching off the manadatory fields in the project ARea.
and the second one is disabiling the email notifications.

The first command executed successfully and then I got the issue with disabling the notifications.

sam detweiler commented Jun 23 '14, 9:05 a.m.

what happens if you reverse those two commands?  order for those shouldn't matter.

I don't KNOW what the problem is, so I am just working thru the debug scenarios..

how does the disable required fields command work? I guess it edits the project process xml.

Surender Biyyala commented Jun 23 '14, 9:08 a.m.

yes it edits the Project Process xml file.

even I wonder whats happening. I have no clue.


sam detweiler commented Jun 23 '14, 9:12 a.m.

sounds like there is some background processing going on after the process xml change which is affecting the the next tool to connect to that same project area.

can u try reversing those two commands (and also at the finish of the batch automation.)

Surender Biyyala commented Jun 23 '14, 9:32 a.m.

 I tried reversing the commands and I also restarted the Server.but no luck :(

Just to confirm Im running this on server installed on my desktop so there wont be any chance for network issues I think.


sam detweiler commented Jun 23 '14, 9:38 a.m.

even more interesting.  what server version are you using?

I have 4.0.1, 4.0.3 4.0.4, 4.0.6 and 5.0 all running locally.

Surender Biyyala commented Jun 23 '14, 9:40 a.m.

 Im using RTC 4.0.5.

sam detweiler commented Jun 23 '14, 9:44 a.m.

4.0.5 seems to have a number of regressions reported. any chance u could try another version locally

Surender Biyyala commented Jun 23 '14, 9:47 a.m.

This is the version we are recently migrated to.

so top in my priority list is getting the tool worked for this version.

Anyways I will test that on a 4.0.4 server to cross check.


sam detweiler commented Jun 23 '14, 10:07 a.m.

my request was only for some version verification of the issue.

showing 5 of 17 show 12 more comments

Be the first one to answer this question!

Register or to post your answer.