Hi Nuwan and all,

We also faced the same issue when accessing Nashorn on OSGi environment. To
overcome the class-loading issues; you can modify system bundle's package
exports to include the Nashorn scripting API package(using Fragment Hosts
approach suggested in [1]).

Please refer "nashorn-osgi-fragment" module [2] in UUF.

<Fragment-Host>system.bundle;extension:=framework</Fragment-Host>
<Export-Package>jdk.nashorn.api.scripting;
version="${nashorn-osgi-fragment.version}"</Export-Package>

Thanks

[1] https://github.com/mszu/nashorn-scripting-api-fragment
[2]
https://github.com/wso2/carbon-uuf/blob/master/nashorn-osgi-fragment/pom.xml

On Wed, May 4, 2016 at 8:04 PM, Manuranga Perera <[email protected]> wrote:

> Hi Nuwan,
> Is the limitation you are facing due to OSGi level class def not found
> exceptions? We faced something slimier and that was due to Nashorn classes
> not been exposed via OSGi. We created a fragment bundle for the system
> bundle to solve this. Please contact Rasika if that's the case.
>



-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: [email protected]
LinkedIn: http://lk.linkedin.com/in/rasika90

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to