When trying to integrate RTC plain jars into a customized WebSphere server application, exception occurred at below code line.
this.teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(this.repositoryURI);
Exception:
[12/2/15 16:04:19:883 SGT] 000000a4 BusinessExcep E CNTR0020E: EJB
threw an unexpected (non-declared) exception during invocation of
method "createTestAutoDefect" on bean
"BeanId(RTCWebClientEAR#RTCWebClient.war#RTCWorkItemHandler, null)".
Exception data: java.lang.NoClassDefFoundError:
com.ibm.team.repository.client.internal.ContributorManager
(initialization failure) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:177) at
com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:427)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:113)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:132)
...
Caused by: 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:192)
at
com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:93)
at
com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:72)
at
com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:60)
at java.lang.J9VMInternals.initializeImpl(Native Method) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:237) at
com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:427)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:113)
at
com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:132)
It seems classes in the RTC plain jars are not properly loaded.
Those jars were put into the library folder of the EAR that hosts the web project that implements RTC functions.