Topic
  • 4 replies
  • Latest Post - ‏2012-09-27T08:33:58Z by MarkN
SystemAdmin
SystemAdmin
153 Posts

Pinned topic OSGi Bundle Uses sun.misc

‏2012-09-25T15:48:08Z |
I have a third party bundle as part of my OSGi .eba packaged application. It has a package uses requirement of 'sun.misc'.

My .eba fails to deploy because sun.misc isn't exposed by the environment. I can see that it's used by WebSphere and provided by the IBM JDK, but I can't get access to the package? I've tried all the standard OSGi settings of bootdelegation and the like with no success.

If this part of our application we could easily change it, but as a third party bundle it is not so easy to workaround. So, is there any way around this issue?

Thanks
Mark
Updated on 2012-09-27T08:33:58Z at 2012-09-27T08:33:58Z by MarkN
  • MarkN
    MarkN
    124 Posts

    Re: OSGi Bundle Uses sun.misc

    ‏2012-09-26T10:56:38Z  
    Hi Simon,
    Thank you for getting touch with us. If your application is failing to install with errors like, "ResolverException... package dependency sun.misc is not satisfied" then yes, we think that there may be a workaround. In this case, if you remove sun.misc from the Import-Package header in the relevant bundle's MANIFEST.MF, the application should install, and work at runtime. This is because we add the sun.* packages to the boot delegation list: they should be available to bundles at run time without the need for an Import-Package statement.

    Do let us know if that works!
    Regards,
    Mark
  • SystemAdmin
    SystemAdmin
    153 Posts

    Re: OSGi Bundle Uses sun.misc

    ‏2012-09-26T15:34:58Z  
    • MarkN
    • ‏2012-09-26T10:56:38Z
    Hi Simon,
    Thank you for getting touch with us. If your application is failing to install with errors like, "ResolverException... package dependency sun.misc is not satisfied" then yes, we think that there may be a workaround. In this case, if you remove sun.misc from the Import-Package header in the relevant bundle's MANIFEST.MF, the application should install, and work at runtime. This is because we add the sun.* packages to the boot delegation list: they should be available to bundles at run time without the need for an Import-Package statement.

    Do let us know if that works!
    Regards,
    Mark
    Hi Simon ;-)

    Ah, ok - that is not something I have tried. So, I will give it a go and get back to you.

    Many thanks for the tip.
    Regards
    Mark
  • SystemAdmin
    SystemAdmin
    153 Posts

    Re: OSGi Bundle Uses sun.misc

    ‏2012-09-26T17:57:23Z  
    Hi Simon ;-)

    Ah, ok - that is not something I have tried. So, I will give it a go and get back to you.

    Many thanks for the tip.
    Regards
    Mark
    Yep, that seemed to do the trick.

    For some reason my business-level .eba application is now only starting when I stop and start the server itself, but at least it's progress in the right directory.

    Many thanks again
    Mark
  • MarkN
    MarkN
    124 Posts

    Re: OSGi Bundle Uses sun.misc

    ‏2012-09-27T08:33:58Z  
    Hi Simon ;-)

    Ah, ok - that is not something I have tried. So, I will give it a go and get back to you.

    Many thanks for the tip.
    Regards
    Mark
    Hi Mark,
    Where did I get 'Simon' from?! Sorry about that. Installed OSGi applications will always start when the server starts, but you should be able to stop and restart them afterwards. Do please let us know if you continue having problems with that.

    Regards,
    Mark