It's all about the answers!

Ask a question

CRJAZ1115I The service xxxxx was not registered


0
1
Hung Lam (2911915) | asked Aug 08 '08, 6:13 p.m.
JAZZ DEVELOPER
Hello,
So I created a sample server service followed the HelloWorld example. I
added to the feature/plugin to the update-site directory under server
directory. After I started my server, I went to
https://localhost:9443/jazz/admin#action=jazz.viewPage&id=com.ibm.team.repository.provision

to check for the status, and it said my plugins are installed and
started. However, I saw "CRJAZ1115I The service my.service.id was not
registered" under Service Error Summary.

Am I missing some steps?
Thanks.

7 answers



permanent link
Simon Archer (2761) | answered Aug 08 '08, 8:09 p.m.
It would be helpful to see the <serviceProvider> contribution that you
made in plugin.xml.

I would also suggest running the server with -console so that you can
interact with the OSGi framework.

1. Shutdown the server.
2. Go to \server\tomcat\webapps\jazz\WEB-INF
3. Edit web.xml and uncomment this block:

<init>
<param>commandline</param>
<param>-console</param>
</init>

4. Save web.xml.
5. Start the server.
6. Login to the server using the web ui and look at the services status
page.

In the console window wou will get an osgi> prompt and be able to:

- Query the installed bundles: ss
- Query the services: services
- Query a particular bundle: bundle <id>

Please post back any data you find about your bundle and the services it
registers.

permanent link
Hung Lam (2911915) | answered Aug 09 '08, 12:51 p.m.
JAZZ DEVELOPER
Thank you Simon.
I have 2 plugins:

In the "common" plugin, I have this extension:

<extension>
<component>
<service>
</service>
</component>
</extension>


In my "server" plugin, I have this extension:

<extension>
<serviceProvider>
<provides>
<providedService>
</providedService>
</provides>
</serviceProvider>
</extension>


I saw my components are installed and started:

24 ACTIVE com.ibm.hung.example.common_1.0.0
25 ACTIVE com.ibm.hung.example.server_1.0.0

However I do not see any references to my services using "services" command.


Simon Archer wrote:
It would be helpful to see the <serviceProvider> contribution that you
made in plugin.xml.

I would also suggest running the server with -console so that you can
interact with the OSGi framework.

1. Shutdown the server.
2. Go to \server\tomcat\webapps\jazz\WEB-INF
3. Edit web.xml and uncomment this block:

init-param
param-name>commandline</param>-console</param> prompt and be able to:

- Query the installed bundles: ss
- Query the services: services
- Query a particular bundle: bundle <id

Please post back any data you find about your bundle and the services it
registers.

permanent link
Simon Archer (2761) | answered Aug 09 '08, 2:42 p.m.
It is important for your <component> element's id attribute (in the
"common" plug-in's plugin.xml) to match that of the <serviceProvider>
element's componentId attribute (in the "service" plug-in's plugin.xml).

Looking at your XML there seems to be a problem there and I would expect
you to have seen the following error either on the console or in your
server log:

The bundle "com.ibm.hung.example.server" has specified in a
<serviceProvider> extension with a component id of
"com.ibm.hung.example.server.serviceProvider" that is unrecognized.
Check for a matching "com.ibm.team.repository.common.components"
extension.


It is also very important that the class specified in the
<serviceProvider> element's implementationClass attribute actually
implements all of the interfaces described in each of the <provides>
element's interface attribute (of course, you just have one).

Given this:

24 ACTIVE com.ibm.hung.example.common_1.0.0
25 ACTIVE com.ibm.hung.example.server_1.0.0

You should then be able to type "bundle 25" and see the OSGi registered
services for the bundle, of which there should be one.

permanent link
Hung Lam (2911915) | answered Aug 10 '08, 12:09 p.m.
JAZZ DEVELOPER
Again, thank you Simon.
I followed from the HelloWorld example. I changed the componentId
attribute to match to id, but still got the same exception. Do I need
any special licenses to register the service? No services registered
for either 24 or 25.

Simon Archer wrote:
It is important for your <component> element's id attribute (in the
"common" plug-in's plugin.xml) to match that of the <serviceProvider> extension with a component id of
"com.ibm.hung.example.server.serviceProvider" that is unrecognized.
Check for a matching "com.ibm.team.repository.common.components"
extension.


It is also very important that the class specified in the
serviceProvider> element's implementationClass attribute actually
implements all of the interfaces described in each of the <provides
element's interface attribute (of course, you just have one).

Given this:

24 ACTIVE com.ibm.hung.example.common_1.0.0
25 ACTIVE com.ibm.hung.example.server_1.0.0

You should then be able to type "bundle 25" and see the OSGi registered
services for the bundle, of which there should be one.

permanent link
Simon Archer (2761) | answered Aug 10 '08, 12:25 p.m.
I followed from the HelloWorld example. I changed the componentId
attribute to match to id, but still got the same exception. Do I need
any special licenses to register the service? No services registered
for either 24 or 25.

No special license is needed for service registration. One avenue we can
investigate would be for you to export your Eclipse projects to zips and
email them to me. I would be happy to take a look and give them a try.
Please send me everything that I'd need to duplicate your configuration.

I'm sure that we're missing something in the discussion. My email
address is sarcher@us.ibm.com. I work on the server development team,
so either I should be able to figure out what's going on, or else
someone around here will be able to.

permanent link
Hung Lam (2911915) | answered Aug 12 '08, 1:15 p.m.
JAZZ DEVELOPER
My problem has been resolved. I fixed the plugin.xml as Simon
explained. And then delete my server and "reinstall" it again. Then
re-added my feature/plugin to the update-site directory. Then after I
started my server, my service is started.

Thank you very much.

Simon Archer wrote:
I followed from the HelloWorld example. I changed the componentId
attribute to match to id, but still got the same exception. Do I need
any special licenses to register the service? No services registered
for either 24 or 25.

No special license is needed for service registration. One avenue we can
investigate would be for you to export your Eclipse projects to zips and
email them to me. I would be happy to take a look and give them a try.
Please send me everything that I'd need to duplicate your configuration.

I'm sure that we're missing something in the discussion. My email
address is sarcher@us.ibm.com. I work on the server development team,
so either I should be able to figure out what's going on, or else
someone around here will be able to.

permanent link
Simon Archer (2761) | answered Aug 12 '08, 2:55 p.m.
My problem has been resolved. I fixed the plugin.xml as Simon
explained. And then delete my server and "reinstall" it again. Then
re-added my feature/plugin to the update-site directory. Then after I
started my server, my service is started.

Thank you very much.

So glad to hear that everything is working now. Cheers, Simon

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.