It's all about the answers!

Ask a question

Jazz Java Plain Api on GWT server side : PROBLEM


Aleksandra Mazurek (11) | asked Jun 27 '09, 2:24 p.m.
hi,
I am writting an GWT application that will use Jazz Api and I have encountered rathe big problem.
When trying to connect to TeamRepository through TeamPlatform on the server side of application :

ITeamRepository repo = TeamPlatform.getTeamRepositoryService()
.getTeamRepository("https://localhost:9443/jazz/");

i am getting an error:
Caused by: java.lang.IllegalArgumentException: port is invalid: -1
at org.apache.commons.httpclient.protocol.Protocol.<init>(Protocol.java:182)
at com.ibm.team.repository.transport.client.RemoteTeamServer.ensureInitialized(RemoteTeamServer.java:147)
at com.ibm.team.repository.transport.client.RemoteTeamServer.setCredentials(RemoteTeamServer.java:171)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:336)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:82)

this exception doesn't occure when using this method in ordinary application or in JUnit test case.
I am using : Rational Team Concert 1.0 SDK

Is there anything I could do about that?

5 answers



permanent link
G D (3642) | answered Jul 13 '09, 8:24 a.m.
I think, i have the same problem in a plugin for eclipse.
Can anybody help us?

Root cause:
java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.

java.lang.ExceptionInInitializerError
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:387)
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)

permanent link
Nick Edgar (6.5k711) | answered Jul 14 '09, 3:45 p.m.
JAZZ DEVELOPER
For the first issue, note that ITeamRepository is a client-side concept. It shouldn't even be referenced in server code. To obtain other services from your service, use the getService(serviceClass) method.

For gd's issue, which version of RTC are you developing against? There are a few work items that match that stack trace, but most were fixed in 1.0 or 1.0.1. Are you running your client as an eclipse/equinox app, or as a plain java app? If the latter, you need to call com.ibm.team.repository.client.TeamPlatform.startup as the first thing you do, but this should not be necessary if running as an eclipse client.

permanent link
G D (3642) | answered Jul 15 '09, 7:44 a.m.
I'm using RTC 2.0 Java Plain SDK in an eclipse/equinox environment.
I have also called com.ibm.team.repository.client.TeamPlatform.startup, this doesn't help.
If i use all jars in one plugin lib directory, the described error appears.
I have solved my problem by using all java plain SDK jars as plugins for eclipse.

permanent link
Nick Edgar (6.5k711) | answered Jul 15 '09, 11:01 a.m.
JAZZ DEVELOPER
gd, could you try the workaround suggested in comment 4 of work item 76455: Error running standalone java app, that is, try calling RepositoryPackage.eINSTANCE.eContents()

permanent link
G D (3642) | answered Jul 17 '09, 9:09 a.m.
gd, could you try the workaround suggested in comment 4 of work item 76455: Error running standalone java app, that is, try calling RepositoryPackage.eINSTANCE.eContents()


the workaround doesn't work for me, but i have already solved my problem by using the java api as plugins in eclipse.

Thank you for your help

Your answer


Register or to post your answer.