Hi Manuranga and Rasika,

Thanks for the reply. But this is a different one. Below are the classes we
can not use in our class since those are internal classes in JDK and we can
not compile a class with below imports since those are only available in
runtime.

import sun.org.mozilla.javascript.internal.Context;
import sun.org.mozilla.javascript.internal.Scriptable;
import sun.org.mozilla.javascript.internal.ScriptableObject;
import sun.org.mozilla.javascript.internal.xml.XMLObject;

Thanks,
Nuwanw

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

> 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
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to