It's all about the answers!

Ask a question

Try to log in and create work items


Jayee Huang (1321111) | asked Apr 26 '13, 5:19 a.m.

I want to log in to RTC and create workitems.

I execute Junit test in Eclispe. It works. Now I used Firefox , on the page, I click a button to execute, I found following errors:

[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R Exception in thread "Thread-41" java.lang.ExceptionInInitializerError
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:417)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:112)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:131)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.workitemCreator.rtc.RTCClientManager.login(RTCClientManager.java:281)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.workitemCreator.rtc.RTCClientManager.accessRepository(RTCClientManager.java:104)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.workitemCreator.template.JobLauncher.operateWokItems(JobLauncher.java:31)
[13-4-26 16:51:08:166 CST] 00000030 SystemErr     R     at com.ibm.workitemCreator.service.impl.WorkItemOperatorThread.run(WorkItemOperatorThread.java:32)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at java.lang.Thread.run(Thread.java:738)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R Caused by: java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:191)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:93)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:72)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:60)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at java.lang.J9VMInternals.initializeImpl(Native Method)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
[13-4-26 16:51:08:167 CST] 00000030 SystemErr     R     ... 9 more

My codei :

TeamPlatform.startup();
ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI); // Error happened on this line.

repositoryURI is:https://igartc02.swg.usma.ibm.com/jazz


Comments
Ralph Schoon commented Apr 26 '13, 5:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't understand the question. Are you having problems with the API or what are you trying to do?

3 answers



permanent link
Jayee Huang (1321111) | answered Apr 26 '13, 6:35 a.m.
Hi Ralph,

My target is logging in to RTC and then operate work items.

Result is:
Execute Junit in Eclipse, following code works well.

But if I run following code via Jsp file, error message is above.

Code is:

try {

            // Start the team platform
            TeamPlatform.startup();

// Error happened with following line.
        teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
       //Process cannot come to following line.
        teamRepository.registerLoginHandler(new DefaultLoginHandler(username,
                password));
       
            teamRepository.login(monitor);
        } catch (TeamRepositoryException e) {
            e.printStackTrace();
        }

// repositoryURI is:   https://igartc02.swg.usma.ibm.com/jazz

permanent link
Ralph Schoon (63.1k33646) | answered Apr 26 '13, 6:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 26 '13, 6:54 a.m.
The code above is Plain Java - client code - I think. If you want to run the code in some web application you write on your own, you have to provide the Plain Java Client Libraries yourself.

If you want to run the code in a Server extension that runs server code your code might be conflicting with the server code. I have not tried to login in a server extension, because these extensions typically run in a user context already. See https://rsjazz.wordpress.com/ for what I have published in this area. I'd suggest to start here: http://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/

There might be something else I am missing. I would try to run the code external to Eclipse first - with Just the plain Java Client Libraries, to make sure you don't reference something that is a server extension or code only shipped in the RTC Eclipse client.

permanent link
Jayee Huang (1321111) | answered Apr 26 '13, 7:21 a.m.
I have downloaded the client libraries and imported all the Jars into my project.

My problem is above code can be run on eclipse As junit  but cannot be run on a jsp file.

There is not any compile error.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.