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.
"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:
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.
4 answers
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:
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.
<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?
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:
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?