It's all about the answers!

Ask a question

Fail to invoke Java API of RTC in osgi bundles, need help


dapeng an (611) | asked Jun 21 '10, 11:17 p.m.
I am developing an application which invokes Java API of RTC. When the application runs in stand-alone J2SE, everything is fine.
However when the application runs in the osgi bundles, exception occurs.
Is there any limitation with invoking the Java API of RTC.

The error stack:
java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.
at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:190)
at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:92)
at com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:57)
at com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:45)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:387)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:366)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:91)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:110)

One answer



permanent link
dapeng an (611) | answered Jul 02 '10, 1:56 a.m.
Never mind, I resolved the issue

When try to login RTC by using Java API.
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(TeamRepository.class.getClassLoader());

//your code to login RTC

Thread.currentThread().setContextClassLoader(loader);

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.