We have a JEE application packaged and deployed as EAR. Now we started to develop some OSGi EJB Application Bundles. Both will be deployed in the same Glassfish instance.
The OSGi EJB bundle includes some classes which are packaged in the EAR too. For example the package com.macd.foo is included in the bundle. The package com.macd.bar is not included in the bundle but added to the the Ignore-Package entry of bundles manifest.
Deploying the EAR fails saying that classes from com.macd.bar package could not be found. But the package com.macd.bar is packaged in the EAR file. If the OSGi bundle is removed deployment of EAR works.
So my questions are:
- Why does the OSGi bundle affects deployment of EAR file?
- How can I deploy OSGi bundles containing classes which are available in the EAR file too?