[closed] Exception in standalone v2 client connecting to repository
Bob Patten (11●5●4)
| asked Aug 12 '11, 6:24 a.m.
closed Mar 01 '18, 2:55 a.m. by Ralph Schoon (63.4k●3●36●46)
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 |
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
Ralph Schoon (63.4k●3●36●46)
| answered Aug 19 '11, 2:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER RESOLVED Thanks for the solution Bob. Ralph Schoon selected this answer as the correct answer
|
6 other answers
Ralph Schoon (63.4k●3●36●46)
| answered Aug 18 '11, 4:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. |
I can repro this using the Snippet1 sample. In Eclipse that snippet works. As a standalone app it fails.
Hi Bob, |
RESOLVED
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, |
Hi Bob,
I am facing same problem, could you please explain this process in detail?
Thank You
|
|
Is there any solution for this issue? I am facing same problem. Comments
Donald Nong
commented Feb 28 '18, 10:38 p.m.
Are you sure? That was a problem posted almost 7 years ago!
And also there an accepted answer, but probably tldr.
As a side note, I have seen executable JARs with the plain java client libraries in newer versions.
|