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 <ruch...@wso2.com> 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 <ruw...@wso2.com> 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 : ruw...@wso2.com
>> 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: ruch...@wso2.com <ruch...@wso2.com>,   blog:
> ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
> mobile: +94 77 5493444 <%2B94%2077%205493444>*
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Cheers,
Madhuka Udantha
http://madhukaudantha.blogspot.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to