Announcement Announcement Module
Collapse
No announcement yet.
Why are bundles containing resources unpacked when deployed? Can I keep them packed? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why are bundles containing resources unpacked when deployed? Can I keep them packed?

    Hello,

    The dm server unpacks bundles that contain resources ( i.e. other jars ) when it deploys them to the work/osgi directory and leaves bundles without internal resources in the packed jar/zip format.

    This is causing problems for us because we bundled a large 3rd party package and it uses

    <code>
    URL source = BootStrap.class.getProtectionDomain().getCodeSourc e().getLocation();
    </code>

    to get it's location. Usually this returns a fully qualified path on the server to the containing packed bundle. But on the dm server since the bundle is unpacked it returns fully qualified path ending with the folder of the unpacked bundle.

    The bootstrap class then fails when it tries to read what it expects is a jar but is actually a folder with:

    <code>
    new ZipInputStream(source.openStream());
    </code>

    My two options are to
    1. figure out if it is possible to configure the server not to unpack this type of bundle when it is deployed.

    or

    2. Check out the 3rd party project, modify the Bootstrap class and recompile the whole thing.

    Option 1 sounds better to me if it is possible.


    Thanks,
    Andy
Working...
X