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
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
Looking at the information you have provided I am curious why "com.ibm.team.workitem.common" is included twice in the feature.xml: Once in as an <import> element (inside the <requires> element) and once as a <plugin> element:
<import>
<plugin>
While this might not be the cause of the problem you are having, it is certainly the first thing to investigate.
<import>
<plugin>
While this might not be the cause of the problem you are having, it is certainly the first thing to investigate.
OK, I concede that posting XML to the forum just does not work, even after the preview says it will. Suffice to say, "com.ibm.team.workitem.common" appears twice in your feature.xml file.
Hi Simon,
Thanks for the reply.
I tried removing the duplicate entry from feature.xml, still am getting the same error.
Is there anything else we need to take care ?
Thanks,
Satheesh
OK, I concede that posting XML to the forum just does not work, even after the preview says it will. Suffice to say, "com.ibm.team.workitem.common" appears twice in your feature.xml file.
Hi Simon,
Thanks for the reply.
I could resolve the issue, it was a version mismatch problem.
I was using RTC 2.0.2 in Tomcat environment and the WAS instance was running on RTC 2.0.
Now, I am facing another problem. I could install the plug-in and it shows status as "RESOLVED". However, its giving Class Cast exception in the logs. So I am not able to proceed.
Please find the error message below:
2010-01-12 20:14:04,968 CRJAZ0291I Failed to start the bundle "example 1.0.0.201001122112".
org.osgi.framework.BundleException: The activator advisor.example.WorkItemFailAdvisor for bundle advisor.example is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:146)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:980)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at com.ibm.team.repository.provision.internal.ProvisionService.startFeatureBundles(ProvisionService.java:1029)
at com.ibm.team.repository.provision.internal.ProvisionService.installFromProfiles(ProvisionService.java:810)
at com.ibm.team.repository.provision.internal.ProvisionService.installFromProfile(ProvisionService.java:866)
at com.ibm.team.repotools.rcp.internal.Provisioner.provision(Provisioner.java:81)
at com.ibm.team.repotools.rcp.internal.Provisioner.installFromProfile(Provisioner.java:72)
at com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.provision(RepositoryToolsApplication.java:605)
at com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.run(RepositoryToolsApplication.java:651)
at com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.start(RepositoryToolsApplication.java:702)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by:
java.lang.ClassCastException: advisor.example.WorkItemFailAdvisor incompatible with org.osgi.framework.BundleActivator
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
... 25 more
Can anybody suggest a solution for this?.
Thanks
Satheesh
Hi,
I could resolve the error and install the plug-in without any error. The OSGI console says:
id State Bundle
150 ACTIVE example_1.0.0.1532
The plug-in is supposed to add one precondition, which will run some custom code while clicking on the 'save' button from the Web UI. I could achieve the same in RTC 2.0 running on Tomcat. Now I have deployed the same plug-in on RTC 2.0 running on WAS and its in 'ACTIVE' state.
However, I am not able to find the new precondition in the 'Process Configurations' tab of Project area, which should be listed in the preconditions list. Is there any thing I am missing here ?. I could see and add the new precondition in Tomcat where as its not showing in RTC running on WAS.
Please suggest me a solution for this ?
Thanks,
Satheesh
I could resolve the error and install the plug-in without any error. The OSGI console says:
id State Bundle
150 ACTIVE example_1.0.0.1532
The plug-in is supposed to add one precondition, which will run some custom code while clicking on the 'save' button from the Web UI. I could achieve the same in RTC 2.0 running on Tomcat. Now I have deployed the same plug-in on RTC 2.0 running on WAS and its in 'ACTIVE' state.
However, I am not able to find the new precondition in the 'Process Configurations' tab of Project area, which should be listed in the preconditions list. Is there any thing I am missing here ?. I could see and add the new precondition in Tomcat where as its not showing in RTC running on WAS.
Please suggest me a solution for this ?
Thanks,
Satheesh
This sounds like
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/83288
Clear you browser cache and reload the page. Also a restart of the
server once it has been provisioned should ensure it works as long as an
admin request was not use to trigger the provision
Richard
On 1/13/2010 6:53 AM, satheeshpg wrote:
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/83288
Clear you browser cache and reload the page. Also a restart of the
server once it has been provisioned should ensure it works as long as an
admin request was not use to trigger the provision
Richard
On 1/13/2010 6:53 AM, satheeshpg wrote:
Hi,
I could resolve the error and install the plug-in without any error.
The OSGI console says:
id State Bundle
150 ACTIVE example_1.0.0.1532
The plug-in is supposed to add one precondition, which will run some
custom code while clicking on the 'save' button from the Web UI. I
could achieve the same in RTC 2.0 running on Tomcat. Now I have
deployed the same plug-in on RTC 2.0 running on WAS and its in
'ACTIVE' state.
However, I am not able to find the new precondition in the 'Process
Configurations' tab of Project area, which should be listed in the
preconditions list. Is there any thing I am missing here ?. I could
see and add the new precondition in Tomcat where as its not showing
in RTC running on WAS.
Please suggest me a solution for this ?
Thanks,
Satheesh
The stack trace is telling you that the class you have specified as the
BundleActivator, "advisor.example.WorkItemFailAdvisor" is invalid due to
a ClassCastException. My guess would be that it does not implement
org.osgi.framework.BundleActivator.
Richard
On 1/12/2010 11:08 AM, satheeshpg wrote:
BundleActivator, "advisor.example.WorkItemFailAdvisor" is invalid due to
a ClassCastException. My guess would be that it does not implement
org.osgi.framework.BundleActivator.
Richard
On 1/12/2010 11:08 AM, satheeshpg wrote:
sarcherwrote:
OK, I concede that posting XML to the forum just does not work, even
after the preview says it will. Suffice to say,
"com.ibm.team.workitem.common" appears twice in your
feature.xml file.
Hi Simon,
Thanks for the reply.
I could resolve the issue, it was a version mismatch problem.
I was using RTC 2.0.2 in Tomcat environment and the WAS instance was
running on RTC 2.0.
Now, I am facing another problem. I could install the plug-in and it
shows status as "RESOLVED". However, its giving Class Cast
exception in the logs. So I am not able to proceed.
Please find the error message below:
2010-01-12 20:14:04,968 CRJAZ0291I Failed to start the bundle
"example 1.0.0.201001122112".
org.osgi.framework.BundleException: The activator
advisor.example.WorkItemFailAdvisor for bundle advisor.example is
invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:146)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:980)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at
com.ibm.team.repository.provision.internal.ProvisionService.startFeatureBundles(ProvisionService.java:1029)
at
com.ibm.team.repository.provision.internal.ProvisionService.installFromProfiles(ProvisionService.java:810)
at
com.ibm.team.repository.provision.internal.ProvisionService.installFromProfile(ProvisionService.java:866)
at
com.ibm.team.repotools.rcp.internal.Provisioner.provision(Provisioner.java:81)
at
com.ibm.team.repotools.rcp.internal.Provisioner.installFromProfile(Provisioner.java:72)
at
com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.provision(RepositoryToolsApplication.java:605)
at
com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.run(RepositoryToolsApplication.java:651)
at
com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.start(RepositoryToolsApplication.java:702)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by:
java.lang.ClassCastException: advisor.example.WorkItemFailAdvisor
incompatible with org.osgi.framework.BundleActivator
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
... 25 more
Can anybody suggest a solution for this?.
Thanks
Satheesh
The stack trace is telling you that the class you have specified as the
BundleActivator, "advisor.example.WorkItemFailAdvisor" is invalid due to
a ClassCastException. My guess would be that it does not implement
org.osgi.framework.BundleActivator.
Richard
Hi Richard,
Thanks a lot for pointing out the issue.
I have implemented the org.osgi.framework.BundleActivator in my class and the error got resolved. Now the I can see the plug-in installed and ACTIVE without any error in the log.
Still I am not able find the new precondition added in the Project Area->Process Configuration-> Preconditions list. Once the plug-in is deployed it should be available in the list right ?. Because after deploying the plug-in, I could see the new precondition added, in Tomcat environment . However, its not happening in WAS environment. Both the servers are running the same version of RTC (RTC 2.0).
Is there any additional configuration required in WAS environment ?. Please guide me if I am missing something.
Thanks,
Satheesh
page 2of 1 pagesof 2 pagesof 3 pages