since we're using WebSphere Application Server for running our applications, for our new project we have chosen OSGi, to gain modularity and versioning.
So far, we have some issues but we've managed to find a workaround for it.
Our application needs to connect with WebSphereMQ server in both directions (send/receive), and therefore we have to wrap up our application into a SCA component to enable OSGi service export and import.
And that's where the problem started to pop up. We have some legacy JAR's that cannot be converted easily into a OSGi-aware JAR's, so we are using these JAR's be placing it into a OSGi bundle and referencing it in MANIFEST.MF (Bundle-ClassPath).
When an OSGi application that contains these bundles is added as component into a SCA, SCA deploy does not work any more, SCA is in partial start state deployed on server and needs to be undeployed manually through admin console.
I'm attaching a sample, it contains an OSGi application "test.osgi.app" with OSGi bundle "test.osgi.biz" that uses my small test JAR "UpperCase.jar" (that JAR is in bundle classpath).
When I deploy "test.osgi.app", everything works OK. But when I put this application into a SCA application as composite (SCA is "test.osgi.sca"), that SCA component cannot be deployed.
If I remove UpperCase.jar from Bundle-ClassPath of "test.osgi.biz", SCA deploy works OK.
Moreover, when I deploy "test.osgi.sca", I cannot undeploy it through RAD but only through admin console (looks like a nasty bug in RAD).
SCA component is developed by the redbook "Getting Started with the Feature Pack for OSGi Applications and JPA 2.0" (component implementation is OSGi application and binding is SCA, added composite).
Please help, because our ongoing project is mainly based on OSGi and we don't want to replace OSGi with something else.
I'm attaching a small example that can be used to reproduce this issue.
Development environment is RAD 8.0.4 and WAS 22.214.171.124.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
8 replies Latest Post - 2012-05-22T14:35:09Z by Tom.Seelbach
Pinned topic [urgent] problem with deployment of SCA application with OSGi composite
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-05-22T14:35:09Z at 2012-05-22T14:35:09Z by Tom.Seelbach
HasanMuhammad 060001CT108 PostsACCEPTED ANSWER
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-18T14:26:23Z in response to MiljenkoCan you please export your OSGI app (.eba) and SCA app 9.jar) and attach it here? I would like to see how exactly your osgi app looks after it is exported as an eba from your RAD project.
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-18T21:17:59Z in response to MiljenkoMiljenko,
I tried to deploy the app, and i'm seeing an exception.
If you look in logs/ffdc do you see anything like this:
5/18/12 17:14:34:995 EDTFFDC Exception:java.lang.NullPointerException SourceId:com.ibm.ws.soa.sca.admin.runtime.impl.SCARuntimeImpl.stop ProbeId:575 Reporter:com.ibm.ws.soa.sca.admin.runtime.impl.SCARuntimeImpl@23b908a
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-21T11:20:17Z in response to Tom.SeelbachHi Tom, Victor,
that's exactly the error I'm getting when trying to deploy SCA application from RAD.
It seems that this bug is related to WAS 8 (because of FFDC WAS logs). As for RAD tooling, I don't know does this error has something related, but after I receive this error RAD does not revert changes on WAS, and I have to remove my application manually via WAS admin console. Looks like RAD is performing a series of unrelated tasks when deploying SCA application, and does not have a proper rollback scenario if one task fails...
I will contact IBM support, but I thought this issue is something already known and addressed (I didn't find any relevant PMR opened, but I might have missed something).
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-22T13:16:37Z in response to MiljenkoHi Miljenko,
I cleaned up my environment and looked closer at the FFDC's. The first FFDC is:
5/22/12 8:09:24:667 EDTFFDC Exception:java.lang.IllegalStateException SourceId:com.ibm.ws.eba.blueprint.transform.impl.Activator.processBlueprints ProbeId:184
java.lang.IllegalStateException: We could not locate /../UpperCase.jar which is on the bundle classpath
Do you see that as well?
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-22T14:35:09Z in response to Tom.SeelbachHi Miljenko,
I see UpperCase.jar in the your zipped up projects, but not in the exported.zip. I added it manually to the eba. I also changed the MANIFEST.MF like this:
I don't think you need the ../
But when i tried to import the asset in the admin console there is a problem:
CWSAL0038W: The asset tom.eba contains a JAR file UpperCase.jar that is not a bundle and that will not be converted. If other parts of the application depend on this file, the application will fail at run time.
Do you want to make Upper.jar into a bundle by updating the manifest?
SystemAdmin 110000D4XK126 PostsACCEPTED ANSWER
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-18T21:26:26Z in response to MiljenkoHi Miljenko
Regarding your RAD problem, can you contact IBM support? That's the proper process to help you out with this defect.
"If you prefer to speak in Spanish, please contact me directly"
email@example.com 120000B2NA1 PostACCEPTED ANSWER
Re: [urgent] problem with deployment of SCA application with OSGi composite2012-05-21T15:01:32Z in response to MiljenkoWhile your issue is being investigated, it might be of interest to you (or others who find this thread) to review a couple of samples we offer.
Our MyBank sample includes an implementation.osgiapp variation (including SDO databinding).
Also available is a more comprehensive redbook example at