Hi Sumedha,

IMO, this is the first time, that one of our component used both Mozilla
Rhino(Jaggery) and Synapse core directly, which indirectly links BSF
embedded Rhino version too. Anyway, we will take this into consideration
when Rhino version of Jaggery is updated again.

/Ruchira


On Mon, May 12, 2014 at 2:28 AM, Sumedha Rubasinghe <[email protected]>wrote:

> On Sun, May 11, 2014 at 11:32 AM, Ruwan Yatawara <[email protected]> wrote:
>
>> Hi All,
>>
>> After much research, we rounded up the problem, this is caused by the API
>> Manager host object using both synapse and jaggery. As I explained in my
>> previous email, when we use two different bundles that use different
>> versions of the same package, inside the same class space, "package use
>> conflicts" are encountered.
>>
>> As a remedy to this problem, we need to upgrade the
>> org.mozilla.javascript version used by jaggery to version 1.7.0. This will
>> also involve a possible upgrade of bsf versions / changing the synapse
>> ScriptMediator to accommodate for possible API changes.
>>
>
> This would mean in future, when org.mozilla.javascript version increments,
> both of these usage points should be updated. right? If so, can we have a
> comment next to Jaggery's org.mozilla.javacript version element mentioning
> this please.
>
> That would save lot of time in future.
>
>
>
>>
>> Thanks much, Kisanthan, Ruchira and Manu for all your help.
>>
>> Thanks and Regards,
>>
>> Ruwan Yatawara
>>
>> WSO2 Inc.
>>
>> email : [email protected]
>> mobile : +94 77 9110413
>> blog : http://thoughts.ruwan-ace.com/
>> www: :http://wso2.com
>>
>>
>>
>> On Fri, May 9, 2014 at 10:56 AM, madhuka udantha <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> This[1] can be helpful for such scenario,
>>> And you issue encounter is correct,
>>> *You can check some AS releases, where it also occurred and fixed as we
>>> added jaggery and mashup to AS.*
>>>
>>> [1]
>>> http://madhukaudantha.blogspot.com/2014/02/writing-hostobject-for-jaggery.html
>>>
>>>
>>>
>>> On Fri, May 9, 2014 at 8:53 AM, Ruchira Wageesha <[email protected]>wrote:
>>>
>>>> Please meet me in the office. Will be able to help you.
>>>>
>>>> /Ruchira
>>>>
>>>>
>>>> On Fri, May 9, 2014 at 12:02 AM, Ruwan Yatawara <[email protected]>wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> We ran in to $subject when trying to use the script mediator in API
>>>>> Manager.
>>>>>
>>>>> When trying to use script mediator in AM APIs the following error is
>>>>> thrown.
>>>>>
>>>>> *Caused by: java.lang.NoClassDefFoundError:
>>>>> com/sun/phobos/script/javascript/RhinoScriptEngineFactory*
>>>>> * at
>>>>> org.apache.synapse.mediators.bsf.ScriptMediator.initScriptEngine(ScriptMediator.java:472)*
>>>>> * at
>>>>> org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:338)*
>>>>> * at
>>>>> org.apache.synapse.mediators.bsf.ScriptMediator.<init>(ScriptMediator.java:148)*
>>>>>
>>>>>
>>>>> To the best of my understanding, following is whats happening here.
>>>>>
>>>>> The script mediator depends on the bsf-all_3.0.0.wso2v2, which needs
>>>>> org.mozilla.javascript; version="1.6.0" or above to function.
>>>>>
>>>>> Jaggery is built to support org.mozilla.javascript; version="1.7.0"
>>>>> and above, and the API Manager host object, depends on both jaggery and
>>>>> synapse to function. When all of this comes together, we believe synapse
>>>>> has a problem with wiring the correct bundles (package usage conflict),
>>>>> leading to above quoted error.
>>>>>
>>>>> To overcome this, there are two options, and both seem to have
>>>>> considerable consequences
>>>>>
>>>>> a) Update the BSF jar to use org.mozilla.javascript; version="1.7.0"
>>>>>
>>>>> b) Update Synapse, restricting it to use org.mozilla.javascript;
>>>>> version="1.6.0", only and APIM host objects to use 1.7.0 specifically.
>>>>>
>>>>>
>>>>> Since Option A might require changes to ESB script mediator, as API
>>>>> changes may be in effect, we went ahead with option (b). This leads to
>>>>> errors in the API Manager Host objects and the bundle goes in to INSTALLED
>>>>> state. The following error is thrown, at startup and there are also errors
>>>>> when trying to invoke the API.
>>>>>
>>>>> *[2014-05-08 23:56:16,246] ERROR - ModuleManager Error while adding
>>>>> HostObject : APIStore 
>>>>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
>>>>> *java.lang.ClassNotFoundException:
>>>>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
>>>>> * at
>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)*
>>>>> * at
>>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)*
>>>>>
>>>>>
>>>>> Has anyone encountered such an issue before? How should we go about
>>>>> fixing this? Your thoughts/ideas/suggestions are welcome.
>>>>>
>>>>>
>>>>> Thanks and Regards,
>>>>>
>>>>> Ruwan Yatawara
>>>>>
>>>>> WSO2 Inc.
>>>>>
>>>>> email : [email protected]
>>>>> mobile : +94 77 9110413
>>>>> blog : http://thoughts.ruwan-ace.com/
>>>>> www: :http://wso2.com
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Ruchira Wageesha**Associate Technical Lead*
>>>> *WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>> <http://wso2.com>*
>>>>
>>>> *email: [email protected] <[email protected]>,   blog:
>>>> ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
>>>> mobile: +94 77 5493444 <%2B94%2077%205493444>*
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Madhuka Udantha
>>> http://madhukaudantha.blogspot.com
>>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> /sumedha
> m: +94 773017743
> b :  bit.ly/sumedha
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Ruchira Wageesha**Associate Technical Lead*
*WSO2 Inc. - lean . enterprise . middleware |  wso2.com <http://wso2.com>*

*email: [email protected] <[email protected]>,   blog:
ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
mobile: +94 77 5493444*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to