IProcessItemService is not remotely accessible
Hello,
I tried following: public Boolean useServerService(IProgressMonitor monitor) throws TeamRepositoryException { return fContext.callCancelableService(new IServiceRunnable<Boolean>() { public Boolean run(IProgressMonitor monitor) throws TeamRepositoryException { IProcessItemService compService = (IProcessItemService) fContext.getServiceInterface(IProcessItemService.class); return compService.getTeamRepository().getAutoLogin(); } }, monitor); } But it threw following exception: com.ibm.team.repository.common.TeamRepositoryException: CRJAZ0055I The service com.ibm.team.process.client.IProcessItemService is not remotely accessible. at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.validateServiceCall(ServiceInterfaceProxy.java:194) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:87) at $Proxy22.getTeamRepository(Unknown Source) at com.ibm.team.sdwb.connector.client.TestRest$1.run(TestRest.java:30) at com.ibm.team.sdwb.connector.client.TestRest$1.run(TestRest.java:1) at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1260) at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79) at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1253) at com.ibm.team.sdwb.connector.client.TestRest.useServerService(TestRest.java:27) at com.ibm.sdwb.cmvc.rtc.synchronizer.wizardPages.PropertyFileNewWizard$2.run(PropertyFileNewWizard.java:521) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) How do I fix this? Is it that the IProcessItemService can not be invoked through an 'outside' client? |
Accepted answer
Hello, Hi, Since you have already had the IClientLibraryContext instance at hand, why don't you use its teamRepository() method to get the IITeamRepository associated with this context? Atul Kumar selected this answer as the correct answer
|
3 other answers
Hi,
IProcessItemService is a client library, it's not a service provided by jazz server. For testing, you can try fContext.getServiceInterface(IRepositoryItemService). Dancy Jazz Foundation Process Team |
Hi, I am having this same problem. My clientlibrary gets loaded, and the method gets called.. in the method, I use the fContext.getServiceInterface(serviceinterface). and it returns a 'proxy' to the class. then my code calls thru the proxy to invoke the method.. but it throws 'service not remotely accessible'. debugging THAT shows that the component is NOT listed in the component registry for some reason. ----- so, finally solved. this takes 4 parts 1. plugin on server with plugin.xml that defines the running service <serviceProvider>.... this service implements the interface, and consumes the interface plugin (dependancy) 2. a plugin that contains just the interface, with a plugin.xml that defines the interface maps to a service. <service uri="interface class name">.... 3. a plugin that implements the clientlibrary architecture, with a plugin.xml that defines the clientLibrary factory, and consumes the interface plugin (dependancy) 4. the application code/plugin, with a plugin.xml that consumes the clientlibrary plugin (dependancy) so, on the server side the packaging is 2 plugins (server and interface), and on the client is 3 plugins (interface, clientlibrary, client code) my problem was the missing plugin.xml on the interface package in 2 above. you can also skip 3, and have the client code (4) use the interface (2) directly repository.getServiceInterface(interface class name). this reduces the number of plugins on the client side to 2 (interface and client code) the interface MUST be packaged separately to prevent the plugin from depending on either client or server side plugins not present on the opposite platform. Sam |
Hi,
Thanks for the help. Actually, I wasn't concerned about getting the repository's reference, I was facing issues with getting a service interface of any of the services exposed by the jazz server. It was throwing the same error (i.e., "*****Service is not remotely accessible") for each of the services. Thanks, Atul |
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.