[closed] Exception in standalone v2 client connecting to repository
This is RTC v2.x.
I am writing a standalone client, and it is failing during logon. This same code runs when executed from within Eclipse.
I am using the latest client JARs (for v2) and am building this into an executable JAR. Since this is working within Eclipse, is there another/replacement JAR that I need for running this standalone?
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:412)
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)
at
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: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)
... 7 more
I am writing a standalone client, and it is failing during logon. This same code runs when executed from within Eclipse.
I am using the latest client JARs (for v2) and am building this into an executable JAR. Since this is working within Eclipse, is there another/replacement JAR that I need for running this standalone?
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:412)
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)
at
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: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)
... 7 more
The question has been closed for the following reason: "The question is answered, right answer was accepted" by rschoon Mar 01 '18, 2:55 a.m.
Accepted answer
6 other answers
I can repro this using the Snippet1 sample. In Eclipse that snippet works. As a standalone app it fails.
Hi Bob,
have you looked in the Plain Java Client Libraries/Plain Java API? There are some snippets that show how to connect to RTC. In general this works similar in Eclipse as well as in a plain java client but you would have to have the Plain Java API jars in the classpath.
RESOLVED
The client work if from a normal JAR file, but not if from an executable JAR file.
The client work if from a normal JAR file, but not if from an executable JAR file.
I can repro this using the Snippet1 sample. In Eclipse that snippet works. As a standalone app it fails.
Hi Bob,
have you looked in the Plain Java Client Libraries/Plain Java API? There are some snippets that show how to connect to RTC. In general this works similar in Eclipse as well as in a plain java client but you would have to have the Plain Java API jars in the classpath.