It's all about the answers!

Ask a question

Using Item Connector Framework


Ankur Sharma (151194) | asked Oct 21 '08, 8:59 a.m.
Hi

We are using Item connector framework for making connector for our defect tracking system. I have a few queries regarding Item connector framework.(https://jazz.net/wiki/bin/view/Main/ItemConnectorCreation) The following are the queires:

1. In Item connector client, there are two implementation choices : as a 'plain java application' or as an 'eclipse plug-in'. Which of these two implementations we should follow? Any idea how is it done in CQ connector ? Note that as per jazz tutorial it is recommended that we should go for 'java application' implementation.

2. While synchronizing from Jazz to External repository (NOT from External repository to jazz), the synchronization process can be started either explicitly or after a fixed interval of time. Is there any other other way to invoke synchronization process e.g. on the basis of event etc. (as this can done while synchronizing from external repository to Jazz).

3. We are not able to find javadoc/code for 'Jazz Plain Java Client libraries'. It would be helpful if we can have some link for it.

Regards
Ankur Sharma

47 answers



permanent link
John Vasta (2.6k15) | answered Apr 23 '09, 12:02 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Well, this is pretty much what it says - the user identity that is trying to initiate incoming synchronization does not have the permission to do so, in the project area containing the synchronization rules. That user must be a member of the project area, assigned a process role that has been granted the needed permissions in the Team Configuration area of the project area configuration.

Hi John

I did some more homework on this problem and I found that this issue is 'Server' specific, because same code is running fine with another remote server. But still if you can give some hint why the problem is on this particular server, that would be helpful.

-Ankur

permanent link
Ankur Sharma (151194) | answered Apr 21 '09, 12:57 p.m.
Hi John

I did some more homework on this problem and I found that this issue is 'Server' specific, because same code is running fine with another remote server. But still if you can give some hint why the problem is on this particular server, that would be helpful.

-Ankur

permanent link
Ankur Sharma (151194) | answered Apr 21 '09, 10:34 a.m.
Hi John,

I am facing a strange exception while testing my code on our remote server. Everything worked fine on local server but on remote server its giving me this exception
Jazz Team Repository Exception: 'Synchronize with External Objects' failed. Permission denied.

com.ibm.team.process.common.advice.TeamOperationCanceledException: 'Synchronize with External Objects' failed. Permission denied.
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:351)
at com.ibm.team.process.internal.common.util.AbstractProcess.doAdvise(AbstractProcess.java:181)
at com.ibm.team.process.internal.service.ServerProcess.access$1(ServerProcess.java:1)
at com.ibm.team.process.internal.service.ServerProcess$2.run(ServerProcess.java:116)
at com.ibm.team.repository.service.internal.TransactionService$1.run(TransactionService.java:99)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:455)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:286)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:241)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:74)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:63)
at sun.reflect.GeneratedMethodAccessor110.invoke(null)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:375)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:55)
at $Proxy35.runInTransaction(null)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:2501)
at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:2508)
at com.ibm.team.process.internal.service.ServerProcess.adviseAndExecute(ServerProcess.java:114)
at com.ibm.team.interop.service.internal.InteropService.saveExternalState(InteropService.java:526)
at sun.reflect.GeneratedMethodAccessor189.invoke(null)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:375)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:55)
at $Proxy99.saveExternalState(null)
at sun.reflect.GeneratedMethodAccessor189.invoke(null)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleMethod(AbstractTeamServerServlet.java:1133)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.executeMethod(AbstractTeamServerServlet.java:883)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doPost(AbstractTeamServerServlet.java:685)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1436)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:810)
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:326)
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:296)
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeFault(MarshallerUtil.java:261)
at com.ibm.team.repository.transport.client.RemoteTeamService.constructExceptionFromFault(RemoteTeamService.java:546)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:461)
at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:184)
at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at $Proxy12.saveExternalState(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:149)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:84)
at $Proxy12.saveExternalState(Unknown Source)
at com.ibm.team.interop.client.internal.InteropManager.doSave(InteropManager.java:1124)
at com.ibm.team.interop.client.internal.InteropManager.saveExternalState(InteropManager.java:523)
at com.ibm.sdwb.connector.workitem.jazz.JazzGateway.synchronizeCMVCTypes(JazzGateway.java:264)
at com.ibm.sdwb.connector.workitem.jazz.JazzGateway.syncEachState(JazzGateway.java:376)
at com.ibm.sdwb.connector.workitem.interop.IncomingSync.syncDefects(IncomingSync.java:214)
at com.ibm.sdwb.connector.workitem.interop.IncomingSync.sync(IncomingSync.java:144)
at com.ibm.sdwb.connector.workitem.interop.IncomingSync.main(IncomingSync.java:87)
Name: Synchronize with External Objects
Id: com.ibm.team.interop.server.synchronize
Severity: ERROR
Summary: Permission Denied
Description: You don't have permission to perform the following actions:
Save external data (incoming/saveState)
Severity: ERROR


Though I have given all the required permission to the user who is running sync process. Also I am not using 'modifiedBy' parameter. So is this some 'weird' error due to connector framework or I am somewhere wrong ? Can somehow user mapping lead to this kind of exception because previously I haven't face such problem on other remote servers.
Infact I am able to successfully run the incoming sync for 'user' workitem with same set of permission, user, projectArea, this exception is coming for only 'defect' workitem.
-Ankur

permanent link
John Vasta (2.6k15) | answered Apr 20 '09, 9:13 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
There is no direct way to see the connection between items other than work items, and external objects. You can indirectly see the connection between a Jazz Contributor item and an external object by opening the synchronization status for a work item that references the Contributor item in some property that is being synchronized (e.g. "Created By" or "Owned By"), and see that there is a corresponding external value for that property.

Feel free to submit an enhancement request, if you'd like.

Hi John,

As in case of Defect work items, we can find in 'external connection' synchronization status link, which can be opened and verified that a defect is linked to some external defect and what synchronization status it has. But I couldn't find anything similar for 'User'. Basically how can I verify that any particular user is linked to some external user or not ?

-Ankur

permanent link
Ankur Sharma (151194) | answered Apr 20 '09, 4:53 a.m.
Hi John,

As in case of Defect work items, we can find in 'external connection' synchronization status link, which can be opened and verified that a defect is linked to some external defect and what synchronization status it has. But I couldn't find anything similar for 'User'. Basically how can I verify that any particular user is linked to some external user or not ?

-Ankur

permanent link
John Vasta (2.6k15) | answered Apr 16 '09, 2:55 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

So If I understand well, all the users will be created manually in Jazz first, give them proper permissions, add them to required team areas. Now user synchronization will create proxies regarding these already exiting users in jazz and subsequently will synchronize any changes in user information. But In case if there is some user which is not found in jazz server but was there in external system, the user synchronization will not be able to create the new user data in jazz.


That's not quite right; the new user data will be created in Jazz, but it won't be created in your LDAP registry, so that user will not be able to login to Jazz.


Also in case of "external modifier", item connector can override earlier configured permissions to that user role and extra required permissions will be granted to that role.


No, not at all; the connector never changes anything having to do with roles or permissions. An "external modifier" property means that the property value identifies a Jazz user, and the connector should execute incoming synchronization under the identity of that user, rather than the identity that the external connector client logs in as. Essentially, it impersonates that user so that the same user that modified an external object is recorded as the user that modified the Jazz object, and that user's role is used to determine whether the Jazz object can be modified (according to your process permissions scheme).


I want your comments on my understanding. Anything extra which we can take advantage of the fact that both jazz and external system uses same LDAP ?


I can't think of anything extra.

permanent link
Ankur Sharma (151194) | answered Apr 16 '09, 1:42 p.m.
Our external system does use LDAP and jazz will also use LDAP. Also in our case, users will use Jazz in almost all the cases rather than external system once connector is deployed, so all the external users need login access to jazz server.

So If I understand well, all the users will be created manually in Jazz first, give them proper permissions, add them to required team areas. Now user synchronization will create proxies regarding these already exiting users in jazz and subsequently will synchronize any changes in user information. But In case if there is some user which is not found in jazz server but was there in external system, the user synchronization will not be able to create the new user data in jazz. Also in case of "external modifier", item connector can override earlier configured permissions to that user role and extra required permissions will be granted to that role.

I want your comments on my understanding. Anything extra which we can take advantage of the fact that both jazz and external system uses same LDAP ?

-Ankur

permanent link
John Vasta (2.6k15) | answered Apr 16 '09, 9:23 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello again Ankur :-)

The Item Connector framework does not support the creation of login accounts for Jazz, but it does allow for the creation of user identity information, so that such information can be synchronized between Jazz and an external system. For example, if synchronizing with some bug-tracking system, you would generally want a bug logged in the external system that says "owned by Ankur" info to result in a work item in Jazz that also says "owned by Ankur". That doesn't mean that you would want to grant all users of the external system automatic login access to your Jazz server. That has to be arranged in some other way.

Depending on the type of user registry you use for Jazz, it may not even be possible to programmatically create login accounts. In fact, accounts can only be created if Jazz is running in Tomcat, using Tomcat's default user registry mechanism. If Tomcat is configured to use LDAP, or the Jazz server is running in WAS, accounts cannot be created via any Jazz API. You would need to somehow arrange for the accounts to be created in whatever user registry system you are using.

Note that it might be possible to configure both Jazz and the external system to use the same user registry. That's possible with ClearQuest, for example, so you can have a configuration where anyone that can login to ClearQuest can also login to Jazz.

To answer your specific questions:


Also for license management, repository permission for a user, adding user in some project Area/Team area, assigning user some role - does Item connector framework provides any support for any of this ? If not, then how to go about all this ?


No, the Item Connector framework provides no way to grant permissions or team area access to users.


How actually we are supposed to map users in external repository and RTC using Item Connector framework. Do we have to create users manually first in the RTC, assign them all the required permissions and then map them with the external users depending upon key field ?


If you want your external user community to also have login access and permissions in Jazz, you need to arrange for that in some way. Again, using the same LDAP repository for both of them helps a lot.


While mapping 'Owned by' field of a workitem with external user name, what does the reference user sync rule do ? Does it refer to the user proxy using key field which is already mapped to the external user by itself Or do we need to somehow handle this reference sync rule in our code ?


When a property mapping specifies a reference sync rule, it means that the value of the property is a reference to another type of object that is synchronized using that sync rule. So since the Owned By property of a work item is a reference to a Contributor item in Jazz, the "instructions" for mapping that Contributor item to some analogous external object are provided by the sync rule. The mapping is automatic; you don't have to do anything in your code to use that mechanism. The properties that are tagged as being "identifiers" are used as lookup keys to try and find existing objects to map to, and if none are found, a new object is created, if possible.


Also I noticed that using 'modifiedBy' external property we don't need any reference sync rule, but it updates the history with the corresponding jazz user name. I made a user in RTC with same user id as of external user and during incoming sync the history was updated with this user name. Is this because in history the user name doesn't show link to 'user editor' and treated as simple text ?


A property tagged with "external modifier" is assumed to have a string value which is a user identifier. During incoming synchronization, if there is a Jazz user with that identifier, then any operations that modify the Jazz item being synchronized are done as the identity of that user. This means that the user will be recorded as the "modifier" of the item in the item's history, and also that any permissions required to modify the item will be granted based on that user's roles in the relevant project and team areas. So the user name that you see in a history view isn't just text; it really is a reference to a Jazz user.

permanent link
Ankur Sharma (151194) | answered Apr 16 '09, 8:34 a.m.
Hi John,

First of all, Thanks for your always so helpful replies. As usual I am again here with another set of doubts. We were trying to create users in RTC corresponding to the users in external repository. Using Contributor manager I was able to create the 'User data' in jazz db. But couldn't login using these created users due to this error :

This user is not in the directory service. The user will not be able to login unless they have an account in the directory service. 


That mean To log in with the user, the username / password has to be configured in the External User Registry (which could be LDAP, Tomcat, or unknown/unsupported). So do we have to do it at our own or is it possible with Item Connector Framework, which I may be missing ?

Also for license management, repository permission for a user, adding user in some project Area/Team area, assigning user some role - does Item connector framework provides any support for any of this ? If not, then how to go about all this ?

How actually we are supposed to map users in external repository and RTC using Item Connector framework. Do we have to create users manually first in the RTC, assign them all the required permissions and then map them with the external users depending upon key field ?

While mapping 'Owned by' field of a workitem with external user name, what does the reference user sync rule do ? Does it refer to the user proxy using key field which is already mapped to the external user by itself Or do we need to somehow handle this reference sync rule in our code ?

Also I noticed that using 'modifiedBy' external property we don't need any reference sync rule, but it updates the history with the corresponding jazz user name. I made a user in RTC with same user id as of external user and during incoming sync the history was updated with this user name. Is this because in history the user name doesn't show link to 'user editor' and treated as simple text ?

- Ankur

permanent link
John Vasta (2.6k15) | answered Apr 07 '09, 3:34 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Changes in the Item Connector Framework APIs for RTC 2.0 are very minor, and are documented here:

https://jazz.net/wiki/bin/view/Main/ItemConnector20Changes

I don't think there is a list of other RTC/Jazz API changes at this point. I suggest posting a separate question to the forum asking that more general question.


This question was missed in some earlier replies "Also there may be some changes in Item connector framework release with RTC 2.0, we'll need to know about them as well. "
Also is there any list available, that tells about the APIs that are changed in RTC 2.0 .

Please reply .

Thanks
Megha

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.