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

OSGI bundle problems when deploying server extension

Hi,

I'm trying to deploy a server extension using the provisioning server, but I am running into problems with OSGI:

$ ./repotools.bat -import fromFile=backup.tar
log4j:WARN No appenders could be found for logger (com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner).
log4j:WARN Please initialize the log4j system properly.
Repo Tools, Version 0.6.0.I20071214-0415
Provisioning using ./profile.ini.
Bundle 'x1' with id 147 is invalid, it is not RESOLVED.
Bundle 'x2' with id 148 is invalid, it is not RESOLVED.
Bundle 'x3' with id 149 is invalid, it is not RESOLVED.
To ignore invalid bundles, re-run repotools with the following property defined:
-Dcom.ibm.team.repotools.rcp.allowInvalidBundles=true
Migration failed

Any body has any ideas?
Annie

0 votes



24 answers

Permanent link
Hi, Satheesh.

It looks like you started with advisor-example.zip from https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample. Are you able to deploy the original advisor.example on WAS? The walk-through only mentions Tomcat and Jetty. I expect it should work on WAS, but it may not have been tested.

Caused by:
java.lang.ClassCastException: advisor.example.WorkItemFailAdvisor
incompatible with org.osgi.framework.BundleActivator


I have implemented the org.osgi.framework.BundleActivator in my class and the error got resolved.


That doesn't sound right to me. WorkItemFailAdvisor is one of the advisor implementations provided in the example. It's not set as the activator in the original. Maybe it was set inadvertently while you were troubleshooting the other issues.

Please check your advisor.example/META-INF/MANIFEST.MF for the following line:
Bundle-Activator: advisor.example.WorkItemFailAdvisor


I'd remove it and unwind your BundleActivator implementation.

-Mark

0 votes


Permanent link
Hi, Satheesh.

It looks like you started with advisor-example.zip from https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample. Are you able to deploy the original advisor.example on WAS? The walk-through only mentions Tomcat and Jetty. I expect it should work on WAS, but it may not have been tested.

Caused by:
java.lang.ClassCastException: advisor.example.WorkItemFailAdvisor
incompatible with org.osgi.framework.BundleActivator


I have implemented the org.osgi.framework.BundleActivator in my class and the error got resolved.


That doesn't sound right to me. WorkItemFailAdvisor is one of the advisor implementations provided in the example. It's not set as the activator in the original. Maybe it was set inadvertently while you were troubleshooting the other issues.

Please check your advisor.example/META-INF/MANIFEST.MF for the following line:
Bundle-Activator: advisor.example.WorkItemFailAdvisor


I'd remove it and unwind your BundleActivator implementation.

-Mark

Hi Mark,

Thanks for the reply.

Yes, I am using the advisor.example and added some custom code to it.
I did not try the orginal advisor.example in WAS.

I have tried both - with BundleActivator and without specifying BundleActivator - options. I could see that the plug-in shows ACTIVE status and no errors in the logs. But the new precondition is not getting loaded in the Process Configuration view.


Thanks,
Satheesh

0 votes


Permanent link
But the new precondition is not getting loaded in the Process Configuration view.


Are the advisors included with the sample still working as expected? If not, I'd definitely test the original projects in your WAS environment. If they don't work, we should focus on getting the sample working first.

Can you post your plugin.xml and the qualified classname of your new advisor?

0 votes


Permanent link
But the new precondition is not getting loaded in the Process Configuration view.


Are the advisors included with the sample still working as expected? If not, I'd definitely test the original projects in your WAS environment. If they don't work, we should focus on getting the sample working first.

Can you post your plugin.xml and the qualified classname of your new advisor?

Hi Mark,

Thanks for the quick reply.

Yes, its working in Tomcat I could not test in WAS because of the above mentioned issue.

Please find the plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.ibm.team.process.service.operationAdvisors">
<operationAdvisor
class="advisor.example.WorkItemFailAdvisor"
id="advisor.example.operationAdvisor"
name="Restrict 'fail' in summary"
operationId="com.ibm.team.workitem.operation.workItemSave">
</operationAdvisor>
<operationAdvisor
class="advisor.example.RestrictDeliverOfDeletionsAdvisor"
id="advisor.example.operationAdvisor2"
name="Restrict Delivering Deletions"
operationId="com.ibm.team.scm.server.deliver">
<extensionService
componentId="com.ibm.team.advisors.examples"
implementationClass="advisor.example.RestrictDeliverOfDeletionsAdvisor">
<prerequisites>
<requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>
<requiredService interface="com.ibm.team.scm.common.IScmService"/>
</prerequisites>
</extensionService>
</operationAdvisor>
</extension>

</plugin>

Thanks,
Satheesh

0 votes

1–15 items
page 3of 1 pagesof 2 pagesof 3 pages

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: Mar 24 '08, 4:45 p.m.

Question was seen: 26,723 times

Last updated: Mar 24 '08, 4:45 p.m.

Confirmation Cancel Confirm