Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Exception while instantiating IChangeEventService

I'm trying to setup a notification mechanism using the Jazz Feed Service. As a first step, I'm trying to setup IChangeEventService on the server for sending the necessary information to the client when certain events occur. I'm following an example on how to instantitate the IChangeEventService object but am getting the following error:
"The service 'edu.ncsu.csc.wolfpoker.jazz.service.NewPokerSessionService@17261726' failed to find the required service 'interface com.ibm.team.repository.common.service.IChangeEventService'. Check <prerequisites> in plugin.xml."

The piece of code I wrote is:

IChangeEventService changeEventService = getService(IChangeEventService.class);
IChangeEvent changeEvent = IChangeEvent.FACTORY.newInstance(session);
changeEventService.save(changeEvent);

The line in bold throws the said exception. And btw, com.ibm.team.repository.common is already in the dependencies.

0 votes



4 answers

Permanent link
It sounds like your service definition is missing the dependency on
com.ibm.team.repository.common.service.IChangeEventService. I know you
said that com.ibm.team.repository.common was in the dependencies, but
"com.ibm.team.repository.common" isn't a service that you can depend on.
Can you copy your serviceProvider extension into this thread so we can
see if you have setup your dependency correctly?

-
Matt Lavin
Jazz Server Team


On Tue, 2009-02-17 at 22:07 +0000, razzman wrote:
I'm trying to setup a notification mechanism using the Jazz Feed
Service. As a first step, I'm trying to setup IChangeEventService on
the server for sending the necessary information to the client when
certain events occur. I'm following an example on how to instantitate
the IChangeEventService object but am getting the following error:
"The service
'edu.ncsu.csc.wolfpoker.jazz.service.NewPokerSessionService@17261726'
failed to find the required service 'interface
com.ibm.team.repository.common.service.IChangeEventService'. Check
prerequisites> in plugin.xml."

The piece of code I wrote is:

IChangeEventService changeEventService =
getService(IChangeEventService.class);
IChangeEvent changeEvent = IChangeEvent.FACTORY.newInstance(session);
changeEventService.save(changeEvent);

The line in bold throws the said exception. And btw,
com.ibm.team.repository.common is already in the dependencies.

0 votes


Permanent link
<extension

point="com.ibm.team.repository.service.serviceProvider">
<serviceProvider
componentId="edu.ncsu.csc.wolfpoker.jazz"
implementationClass="edu.ncsu.csc.wolfpoker.jazz.service.NewPokerSessionService">
<provides>
<providedService
interface="edu.ncsu.csc.wolfpoker.jazz.common.IWolfPokerService">
</providedService></provides>
<prerequisites>
<requiredService
interface="com.ibm.team.repository.common.service.IQueryService">
</requiredService>
<requiredService
interface="com.ibm.team.repository.service.IRepositoryItemService">
</requiredService></prerequisites>
</serviceProvider>
</extension>


Is that what you were looking for?

0 votes


Permanent link
Yes, that is what I was looking for. It looks to me like your service
depends on com.ibm.team.repository.common.service.IQueryService and
com.ibm.team.repository.service.IRepositoryItemService. If you would
like to use the IChangeEventService then you should add a new
<requiredService> block that lists the IChangeEventService

-
Matt Lavin
Jazz Server Team


On Fri, 2009-02-20 at 03:17 +0000, razzman wrote:
extension

point="com.ibm.team.repository.service.serviceProvider"
serviceProvider
componentId="edu.ncsu.csc.wolfpoker.jazz"

implementationClass="edu.ncsu.csc.wolfpoker.jazz.service.NewPokerSessionService"
provides
providedService

interface="edu.ncsu.csc.wolfpoker.jazz.common.IWolfPokerService"
/providedService></provides></prerequisites
/serviceProvider
/extension

Is that what you were looking for?

0 votes


Permanent link
It worked! Thanks for your help!

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Feb 17 '09, 5:06 p.m.

Question was seen: 6,697 times

Last updated: Feb 17 '09, 5:06 p.m.

Confirmation Cancel Confirm