RTC Plain Java API and Jazz Authentication Server
![]()
I'm curious to know if anyone has used the RTC Plain Java API in an environment configured to use Jazz Authentication Server. My customer has several environments, one of which uses JAS. In that one environment, ITeamRepository.login() method throws an error (which effectively makes the entire API unusable).
com.ibm.team.repository.common.transport.ServiceMethodInvocationError: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V at com.ibm.team.repository.transport.client.RemoteTeamService.getAppropriateException(RemoteTeamService.java:737) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:573) at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:202) at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43) at com.sun.proxy.$Proxy0.describe(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110) at com.sun.proxy.$Proxy0.describe(Unknown Source) at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepository.java:1564) at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepository.java:1) at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1327) at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79) at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1322) at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1557) at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:653) at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:627) at com.att.tdp.qm.ProjectAreaManager.login(ProjectAreaManager.java:154) at com.att.tdp.qm.ProjectAreaManager.<init>(ProjectAreaManager.java:120) at com.att.tdp.qm.scripts.MotsApplicationUpdater.execute(MotsApplicationUpdater.java:303) at com.att.tdp.qm.runners.MotsRunner.execute(MotsRunner.java:51) at com.att.tdp.qm.runners.GenericRunner.run(GenericRunner.java:109) at com.att.tdp.qm.ct.Application.run(CommandLineUtil.java:198) at com.att.tdp.qm.ct.CommandLineUtil.main(CommandLineUtil.java:306) Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.<init>(I)V at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:218) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:262) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at com.ibm.team.repository.transport.client.RemoteTeamServer.executePrimitiveRequest(RemoteTeamServer.java:1870) at com.ibm.team.repository.transport.client.RemoteTeamServer.handleAuthorizationServerChallenge(RemoteTeamServer.java:1358) at com.ibm.team.repository.transport.client.RemoteTeamServer.handleBearerChallenge(RemoteTeamServer.java:1419) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeWithAuthHandling(RemoteTeamServer.java:1556) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1170) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1119) at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:658) at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:605) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:548) ... 25 more |
Accepted answer
![]()
The answer:
1. Jazz Authentication Server (for some reason) requires at least version 1.4 of the Apache commons-codec library.
2. The RTC Java client includes version 1.3. Replacing 1.3 with 1.4 or higher resolves the issue.
Ralph Schoon selected this answer as the correct answer
Comments ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Thanks for sharing! Is there an enhancement or defect that tracks this getting fixed? And some documentation how to apply the workaround?
Another fun fact: The comment I made earlier about Eclipse not being to authenticate was caused by a customer configuration issue: Eclipse can authenticate in a JAS environment. So I did some poking around and discovered that the RTC Eclipse client includes versions 1.3 and 1.9 of codec:
![]()
I then tested what happens if Eclipse doesn't have 1.9 commons-codec: the Work Items perspective wouldn't even load.
which 'rtc eclipse clients'.. a single eclipse can't include BOTH
The image above shows clearly that both versions are shipped. I'm not claiming that both are used, simply that both jars are present on the filesystem (and based on behavior, it seems obvious that the 1.9 version is the one used). That image is from the standalone RTC Eclipse Client (downloadable zip). I saw the same situation (both 1.3 and 1.9) in an Installation Manager instance. Not totally sure what it shows. the org.apache.commons.codec_1.3.0.v20100518-1140.jar is the plugin for the codec. It contains some org.apache.commons.codec_1.3.0.v20100518-1140.jar\org\apache\commons\codec.
I don't know the details, either, but the RTC client library (the standalone zip) -- up through version 6.0.3 M6 -- only includes the org.apache.commons.codec_1.3.0.v20100518-1140.jar, which we now know can't be used in Jazz Authentication Server environment.
showing 5 of 6
show 1 more comments
|