It's all about the answers!

Ask a question

API login problem


George Papayiannis (1) | asked Oct 22 '07, 10:15 a.m.
Hi everyone,

I'm stuck on how to to solve the following problem. I'm trying to use the Jazz API to login to a repository, but I get the following crash when I run my code. Does anyone know what "The name (Contributor) and namespace URI (com.ibm.team.repository) do not resolve to a IItemType" means or how to solve it?

Thanks,
George


Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:214)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:303)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:345)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:105)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:124)
at com.ibm.nativefsagent.SessionControl.login(SessionControl.java:29)
at com.ibm.nativefsagent.NativeFileSystemAgent4i.main(NativeFileSystemAgent4i.java:31)
Caused by: java.lang.IllegalArgumentException: The name (Contributor) and namespace URI (com.ibm.team.repository) do not resolve to a IItemType
at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:135)
at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:91)
at com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:54)
at com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:42)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:192)
... 6 more

One answer



permanent link
Chris Daly (61651) | answered Oct 23 '07, 12:19 a.m.
JAZZ DEVELOPER
gpapayia wrote:
Hi everyone,

I'm stuck on how to to solve the following problem. I'm trying to use
the Jazz API to login to a repository, but I get the following crash
when I run my code. Does anyone know what "The name
(Contributor) and namespace URI (com.ibm.team.repository) do not
resolve to a IItemType" means or how to solve it?


Question: Did you start with one of our sample launch configurations
and then at some point use the "Add Required Plug-ins" button in the
launch configuration dialog?

This sort of looks like a problem lots of people have been running into
after using "Add Required Plug-ins". There is more information here:

https://jazz.net/wiki/bin/view/Main/JazzDevPitfalls
https://jazz.net/wiki/bin/view/Main/JazzServerRunAndDebug

It could be something different, but it reminds me of the bad launch
problem because of this line in the exception stack:

com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:135)

which indicates that null is getting returned in the getItemType()
method on this statement:

IItemType itemType = IItemType.IRegistry.INSTANCE.getItemType(typeName,
nsURI);

I've seen that when the launch configs get messed up, these registries
do not get initialized correctly and you end up with a problem like this
that doesn't make much sense (because ordinarily this Contributor type
should always be in the registry).

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.