It's all about the answers!

Ask a question

Jazz getClientLibrary(IWorkItemClient.class) API Call Except


Ahmed Hadad (106187) | asked May 18 '08, 3:27 p.m.
Calling the following method throws Exception. This method is being called
from an external application that connects to Jazz through the Jazz APIs.

Preconditions:

Platform started successfully
TeamRepository accessed successfully
Login completed successfully

IWorkItemClient workItemClient = (IWorkItemClient)
repo.getClientLibrary(IWorkItemClient.class);

common - Invalid icon URL:
"{0}"platform:/plugin/com.ibm.team.build.ui/icons/obj16/bld_rslt.gif
<java>java.net.MalformedURLException: unknown protocol: platform
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createIconURL(LinkTypeRegistry.java:349)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createEndPointDescriptor(LinkTypeRegistry.java:244)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readElement(LinkTypeRegistry.java:152)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readRegistry(LinkTypeRegistry.java:131)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:100)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:99)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$SingletonHolder.<clinit>(LinkTypeRegistry.java:41)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getInstance(LinkTypeRegistry.java:46)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getLinkType(LinkTypeRegistry.java:61)
at com.ibm.team.workitem.common.internal.util.Utils.<clinit>(Utils.java:72)
at
com.ibm.team.workitem.common.internal.util.AuditablesHelper.<clinit>(AuditablesHelper.java:31)
at com.ibm.team.workitem.common.model.IWorkItem.<clinit>(IWorkItem.java:72)
at
com.ibm.team.workitem.client.internal.WorkItemClient.<clinit>(WorkItemClient.java:345)
at
com.ibm.team.workitem.client.internal.WorkItemClientLibraryFactory.createClientLibrary(WorkItemClientLibraryFactory.java:17)
at
com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
at
com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:408)
at
com.ibm.cde.jazz.actions.ActionCreateDefect.execute(ActionCreateDefect.java:57)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:161)
at java.lang.Thread.run(Unknown Source)

common - Invalid icon URL:
"{0}"platform:/plugin/com.ibm.team.workitem.common/icons/obj16/wi_bug.gif
<java>java.net.MalformedURLException: unknown protocol: platform
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createIconURL(LinkTypeRegistry.java:349)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createEndPointDescriptor(LinkTypeRegistry.java:244)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readElement(LinkTypeRegistry.java:153)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readRegistry(LinkTypeRegistry.java:131)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:100)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:99)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$SingletonHolder.<clinit>(LinkTypeRegistry.java:41)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getInstance(LinkTypeRegistry.java:46)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getLinkType(LinkTypeRegistry.java:61)
at com.ibm.team.workitem.common.internal.util.Utils.<clinit>(Utils.java:72)
at
com.ibm.team.workitem.common.internal.util.AuditablesHelper.<clinit>(AuditablesHelper.java:31)
at com.ibm.team.workitem.common.model.IWorkItem.<clinit>(IWorkItem.java:72)
at
com.ibm.team.workitem.client.internal.WorkItemClient.<clinit>(WorkItemClient.java:345)
at
com.ibm.team.workitem.client.internal.WorkItemClientLibraryFactory.createClientLibrary(WorkItemClientLibraryFactory.java:17)
at
com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
at
com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:408)
at
com.ibm.cde.jazz.actions.ActionCreateDefect.execute(ActionCreateDefect.java:57)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:161)
at java.lang.Thread.run(Unknown Source)


--
Sincerely,

Ahmed Hadad

6 answers



permanent link
Ahmed Hadad (106187) | answered May 19 '08, 10:52 a.m.
Are there more details needed to figure out what is wrong in this case?

--
Sincerely,

Ahmed Hadad

"Ahmed Hadad (IBM)" <ahadad> wrote in message
news:g0pvuq$oa6$1@localhost.localdomain...
Calling the following method throws Exception. This method is being called
from an external application that connects to Jazz through the Jazz APIs.

Preconditions:

Platform started successfully
TeamRepository accessed successfully
Login completed successfully

IWorkItemClient workItemClient = (IWorkItemClient)
repo.getClientLibrary(IWorkItemClient.class);

common - Invalid icon URL:
"{0}"platform:/plugin/com.ibm.team.build.ui/icons/obj16/bld_rslt.gif
java.net.MalformedURLException: unknown protocol:
platform>java.net.MalformedURLException: unknown protocol: platform
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createIconURL(LinkTypeRegistry.java:349)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createEndPointDescriptor(LinkTypeRegistry.java:244)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readElement(LinkTypeRegistry.java:152)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readRegistry(LinkTypeRegistry.java:131)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:100)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:99)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$SingletonHolder.<clinit>(LinkTypeRegistry.java:41)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getInstance(LinkTypeRegistry.java:46)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getLinkType(LinkTypeRegistry.java:61)
at
com.ibm.team.workitem.common.internal.util.Utils.<clinit>(Utils.java:72)
at
com.ibm.team.workitem.common.internal.util.AuditablesHelper.<clinit>(AuditablesHelper.java:31)
at
com.ibm.team.workitem.common.model.IWorkItem.<clinit>(IWorkItem.java:72)
at
com.ibm.team.workitem.client.internal.WorkItemClient.<clinit>(WorkItemClient.java:345)
at
com.ibm.team.workitem.client.internal.WorkItemClientLibraryFactory.createClientLibrary(WorkItemClientLibraryFactory.java:17)
at
com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
at
com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:408)
at
com.ibm.cde.jazz.actions.ActionCreateDefect.execute(ActionCreateDefect.java:57)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:161)
at java.lang.Thread.run(Unknown Source)

common - Invalid icon URL:
"{0}"platform:/plugin/com.ibm.team.workitem.common/icons/obj16/wi_bug.gif
java.net.MalformedURLException: unknown protocol:
platform>java.net.MalformedURLException: unknown protocol: platform
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createIconURL(LinkTypeRegistry.java:349)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.createEndPointDescriptor(LinkTypeRegistry.java:244)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readElement(LinkTypeRegistry.java:153)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.readRegistry(LinkTypeRegistry.java:131)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:100)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$Impl.<init>(LinkTypeRegistry.java:99)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry$SingletonHolder.<clinit>(LinkTypeRegistry.java:41)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getInstance(LinkTypeRegistry.java:46)
at
com.ibm.team.links.common.internal.registry.LinkTypeRegistry.getLinkType(LinkTypeRegistry.java:61)
at
com.ibm.team.workitem.common.internal.util.Utils.<clinit>(Utils.java:72)
at
com.ibm.team.workitem.common.internal.util.AuditablesHelper.<clinit>(AuditablesHelper.java:31)
at
com.ibm.team.workitem.common.model.IWorkItem.<clinit>(IWorkItem.java:72)
at
com.ibm.team.workitem.client.internal.WorkItemClient.<clinit>(WorkItemClient.java:345)
at
com.ibm.team.workitem.client.internal.WorkItemClientLibraryFactory.createClientLibrary(WorkItemClientLibraryFactory.java:17)
at
com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
at
com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:408)
at
com.ibm.cde.jazz.actions.ActionCreateDefect.execute(ActionCreateDefect.java:57)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:161)
at java.lang.Thread.run(Unknown Source)


--
Sincerely,

Ahmed Hadad

permanent link
Patrick Streule (4.9k21) | answered May 19 '08, 12:02 p.m.
JAZZ DEVELOPER
Are there more details needed to figure out what is wrong in this case?

Please create a work item for this issue.

The problem is the icon reference to a plugin resource, and there is no
protocol handler for 'platform' in the plain java environment.

-- Patrick
Jazz Work Item Team

permanent link
Ahmed Hadad (106187) | answered May 19 '08, 1:05 p.m.
I have opened the workitem. Thanks.

Is there a workaround that will allow me to get a reference to the
IWorkItemClinet object?

--
Sincerely,

Ahmed Hadad

"Patrick Streule" <patrick_streule> wrote in message
news:g0s8cg$n21$1@localhost.localdomain...
Are there more details needed to figure out what is wrong in this case?

Please create a work item for this issue.

The problem is the icon reference to a plugin resource, and there is no
protocol handler for 'platform' in the plain java environment.

-- Patrick
Jazz Work Item Team

permanent link
Patrick Streule (4.9k21) | answered May 19 '08, 1:15 p.m.
JAZZ DEVELOPER
Ahmed Hadad (IBM) wrote:
I have opened the workitem. Thanks.

Is there a workaround that will allow me to get a reference to the
IWorkItemClinet object?

Telling from the code in LinkTypeRegistry, the exception is only logged
but not thrown, so your code should work despite the log entry.

--Patrick
Jazz Work Item Team

permanent link
Ahmed Hadad (106187) | answered May 19 '08, 2:41 p.m.
Can you please post some sample code that shows how to get the reference
this way? Thanks.

--
Sincerely,

Ahmed Hadad

"Patrick Streule" <patrick_streule> wrote in message
news:g0scld$otk$1@localhost.localdomain...
Ahmed Hadad (IBM) wrote:
I have opened the workitem. Thanks.

Is there a workaround that will allow me to get a reference to the
IWorkItemClinet object?

Telling from the code in LinkTypeRegistry, the exception is only logged
but not thrown, so your code should work despite the log entry.

--Patrick
Jazz Work Item Team

permanent link
Patrick Streule (4.9k21) | answered May 19 '08, 2:50 p.m.
JAZZ DEVELOPER
Can you please post some sample code that shows how to get the reference
this way? Thanks.

repo.getClientLibrary(IWorkItemClient.class) is the only way to get the
reference. What I meant is that this code will work (with the exception
being logged) until the defect is fixed.

--Patrick
Jazz Work Item Team

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.