It's all about the answers!

Ask a question

[closed] Exception in standalone v2 client connecting to repository


0
1
Bob Patten (1154) | asked Aug 12 '11, 6:24 a.m.
closed Mar 01 '18, 2:55 a.m. by Ralph Schoon (63.4k33646)
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


permanent link
Ralph Schoon (63.4k33646) | answered Aug 19 '11, 2:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
RESOLVED
The client work if from a normal JAR file, but not if from an executable JAR file.


Thanks for the solution Bob.
Ralph Schoon selected this answer as the correct answer

6 other answers



permanent link
Ralph Schoon (63.4k33646) | 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.

permanent link
Bob Patten (1154) | answered Aug 18 '11, 2:54 p.m.
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.

permanent link
Bob Patten (1154) | answered Aug 18 '11, 4:29 p.m.
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,

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.

permanent link
vikrant kamble (1323897) | answered Oct 16 '15, 9:27 a.m.
 Hi Bob,
I am facing same problem, could you please explain this process in detail?
Thank You

permanent link
Shasi kumar (112) | answered Jan 02 '18, 8:10 a.m.

Is there any solution for this issue?


permanent link
Vanderson Silva (1) | answered Feb 28 '18, 5:08 p.m.

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!


Ralph Schoon commented Mar 01 '18, 2:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

And also there an accepted answer, but probably tldr.


Ralph Schoon commented Mar 01 '18, 2:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As a side note, I have seen executable JARs with the plain java client libraries in newer versions.