Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Jazz Java Plain Api on GWT server side : PROBLEM

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?

0 votes



5 answers

Permanent link
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)

0 votes


Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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()

0 votes


Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jun 27 '09, 2:24 p.m.

Question was seen: 10,144 times

Last updated: Jun 27 '09, 2:24 p.m.

Confirmation Cancel Confirm