It's all about the answers!

Ask a question

HTTP 301 returned using Plain Java client RequestBuildExampl


Jeremy Hughes (2164837) | asked Dec 06 '08, 3:08 p.m.
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

6 answers



permanent link
Matt Lavin (2.7k2) | answered Dec 08 '08, 8:18 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
What is the URL you are using to connect to the repository? If you are
getting a 301, then you are likely also getting a "Location:" header
sent with the new address as well, what is the new address it is sending
you to?

-
Matt Lavin
Jazz Server Team


On Sat, 2008-12-06 at 20:00 +0000, Jeremy Hughes wrote:
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

permanent link
Jeremy Hughes (2164837) | answered Dec 09 '08, 9:38 a.m.
It POSTs to:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService


and I get:

Location: /jazz/web

in the response headers.

Phew, this wasn't easy to get. I couldn't use tcpmon as I'm using https.
So I had to dig around in Apache Commons HttpClient in the debugger.

btw: in the TeamServer 1.0.1 source zip, there's no source for Apache
Commons HttpClient. I was expecting to find it in here:

source\rtc\eclipse\plugins\com.ibm.team.repository.feature.client.source_0.6.1.I200810062328-47t789xYGHNPGICYZXK\src\org.apache.commons.httpclient_3.0.0

Does this help you narrow down the issue?

Thanks,
Jeremy

On 08/12/2008 13:16, Matt Lavin wrote:
What is the URL you are using to connect to the repository? If you are
getting a 301, then you are likely also getting a "Location:" header
sent with the new address as well, what is the new address it is sending
you to?

-
Matt Lavin
Jazz Server Team


On Sat, 2008-12-06 at 20:00 +0000, Jeremy Hughes wrote:
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

permanent link
Matt Lavin (2.7k2) | answered Dec 09 '08, 11:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Yes, that helps alot. The URL space /jazz/web is purely for web UI
presentation, and you are being redirected because the URL you have is
not a valid web UI presentation URL.

If you want to make a service call, you can use a url like
/jazz/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService

-
Matt Lavin
Jazz Server Team


On Tue, 2008-12-09 at 14:30 +0000, Jeremy Hughes wrote:
It POSTs to:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService


and I get:

Location: /jazz/web

in the response headers.

Phew, this wasn't easy to get. I couldn't use tcpmon as I'm using https.
So I had to dig around in Apache Commons HttpClient in the debugger.

btw: in the TeamServer 1.0.1 source zip, there's no source for Apache
Commons HttpClient. I was expecting to find it in here:

source\rtc\eclipse\plugins\com.ibm.team.repository.feature.client.source_0.6.1.I200810062328-47t789xYGHNPGICYZXK\src\org.apache.commons.httpclient_3.0.0

Does this help you narrow down the issue?

Thanks,
Jeremy

On 08/12/2008 13:16, Matt Lavin wrote:
What is the URL you are using to connect to the repository? If you are
getting a 301, then you are likely also getting a "Location:" header
sent with the new address as well, what is the new address it is sending
you to?

-
Matt Lavin
Jazz Server Team


On Sat, 2008-12-06 at 20:00 +0000, Jeremy Hughes wrote:
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

permanent link
Jeremy Hughes (2164837) | answered Dec 09 '08, 12:58 p.m.
Oh, I'm just running the example which doesn't provide a URL. Under the
API, the:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService

URL is being used and the HTTP 301 is coming back with:

Location: /jazz/web

Doesn't this mean the server didn't like the long URL and indicated that
the short one should be used. But the code behind the API didn't follow
the redirection?

Regards,
Jeremy

On 09/12/2008 16:51, Matt Lavin wrote:
Yes, that helps alot. The URL space /jazz/web is purely for web UI
presentation, and you are being redirected because the URL you have is
not a valid web UI presentation URL.

If you want to make a service call, you can use a url like
/jazz/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService

-
Matt Lavin
Jazz Server Team


On Tue, 2008-12-09 at 14:30 +0000, Jeremy Hughes wrote:
It POSTs to:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService


and I get:

Location: /jazz/web

in the response headers.

Phew, this wasn't easy to get. I couldn't use tcpmon as I'm using https.
So I had to dig around in Apache Commons HttpClient in the debugger.

btw: in the TeamServer 1.0.1 source zip, there's no source for Apache
Commons HttpClient. I was expecting to find it in here:

source\rtc\eclipse\plugins\com.ibm.team.repository.feature.client.source_0.6.1.I200810062328-47t789xYGHNPGICYZXK\src\org.apache.commons.httpclient_3.0.0

Does this help you narrow down the issue?

Thanks,
Jeremy

On 08/12/2008 13:16, Matt Lavin wrote:
What is the URL you are using to connect to the repository? If you are
getting a 301, then you are likely also getting a "Location:" header
sent with the new address as well, what is the new address it is sending
you to?

-
Matt Lavin
Jazz Server Team


On Sat, 2008-12-06 at 20:00 +0000, Jeremy Hughes wrote:
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

permanent link
Matt Lavin (2.7k2) | answered Dec 09 '08, 1:58 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
I'm surprised that the example code would point to anything in
the /jazz/web URL space. The request
to /jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService is completely wrong, so it's not as simple as the client handling the redirect correctly.

When you run the example, it says to input some program arguments, and
the first argument is "https://localhost:9443/jazz". Is is possible
that you have accidentally entered "https://localhost:9443/jazz/web"?

-
Matt Lavin
Jazz Server Team


On Tue, 2008-12-09 at 17:48 +0000, Jeremy Hughes wrote:
Oh, I'm just running the example which doesn't provide a URL. Under the
API, the:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService

URL is being used and the HTTP 301 is coming back with:

Location: /jazz/web

Doesn't this mean the server didn't like the long URL and indicated that
the short one should be used. But the code behind the API didn't follow
the redirection?

Regards,
Jeremy

On 09/12/2008 16:51, Matt Lavin wrote:
Yes, that helps alot. The URL space /jazz/web is purely for web UI
presentation, and you are being redirected because the URL you have is
not a valid web UI presentation URL.

If you want to make a service call, you can use a url like
/jazz/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService

-
Matt Lavin
Jazz Server Team


On Tue, 2008-12-09 at 14:30 +0000, Jeremy Hughes wrote:
It POSTs to:

/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService


and I get:

Location: /jazz/web

in the response headers.

Phew, this wasn't easy to get. I couldn't use tcpmon as I'm using https.
So I had to dig around in Apache Commons HttpClient in the debugger.

btw: in the TeamServer 1.0.1 source zip, there's no source for Apache
Commons HttpClient. I was expecting to find it in here:

source\rtc\eclipse\plugins\com.ibm.team.repository.feature.client.source_0.6.1.I200810062328-47t789xYGHNPGICYZXK\src\org.apache.commons.httpclient_3.0.0

Does this help you narrow down the issue?

Thanks,
Jeremy

On 08/12/2008 13:16, Matt Lavin wrote:
What is the URL you are using to connect to the repository? If you are
getting a 301, then you are likely also getting a "Location:" header
sent with the new address as well, what is the new address it is sending
you to?

-
Matt Lavin
Jazz Server Team


On Sat, 2008-12-06 at 20:00 +0000, Jeremy Hughes wrote:
Hi, I've just tried to run this example from
https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples and got
this error:

Unable to login: CRJAZ0098I The
com.ibm.team.repository.common.internal.IRepositoryRemoteService{/jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService}
service failed. The server returned the http error 301 (Moved
Permanently). Examine any further details here or look in the server
log files for more information on how to resolve the issue.

I get the same when doing 1.0.1 to 1.0 server or 1.0.1 server. I'm just
using Tomcat.

Any ideas?

Thanks,
Jeremy

permanent link
Jeremy Hughes (2164837) | answered Dec 09 '08, 2:38 p.m.
On 09/12/2008 18:48, Matt Lavin wrote:
I'm surprised that the example code would point to anything in
the /jazz/web URL space. The request
to /jazz/web/service/com.ibm.team.repository.common.internal.IRepositoryRemoteService is completely wrong, so it's not as simple as the client handling the redirect correctly.

When you run the example, it says to input some program arguments, and
the first argument is "https://localhost:9443/jazz". Is is possible
that you have accidentally entered "https://localhost:9443/jazz/web"?

Very possible. In fact that's the exact problem. (blush).

Thanks,
Jeremy

Your answer


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