It's all about the answers!

Ask a question

OSGI bundle problems when deploying server extension


Annie Ying (2063103) | asked Mar 24 '08, 4:45 p.m.
JAZZ DEVELOPER
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

24 answers



permanent link
Mark Buquor (36) | answered Jan 20 '10, 7:31 a.m.
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

permanent link
SATHEESH Gopinathan (41) | answered Jan 20 '10, 7:38 a.m.
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

permanent link
Mark Buquor (36) | answered Jan 20 '10, 8:01 a.m.
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?

permanent link
SATHEESH Gopinathan (41) | answered Jan 20 '10, 8:06 a.m.
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

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.