In the next release of API Manager, we are hoping to use the synapse
version used in ESB. Which should have the support for Groovy as well. If
all goes well (no OSGI related errors) we can get the full support of the
underlying synapse engine.

Thanks,
NuwanD.

On Wed, Oct 14, 2015 at 9:54 AM, Shenavi de Mel <shen...@wso2.com> wrote:

> @ copying AmilaM
>
> Thanks Ruwan and Isuru for that explanation.
>
> @Nuwan - Can we get the support of groovy for APIM in the next release? Or
> has it been scheduled for a future release?
>
> Regards
> Shenavi
>
>
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: shen...@wso2.com
> mobile:+94771244470
>
>
> On Wed, Oct 14, 2015 at 7:12 AM, Ruwan Yatawara <ruw...@wso2.com> wrote:
>
>> Yes Shenavi, as Isuru pointed out, this is infact the case. There was a
>> problem with the java script mediator on earlier versions of APIM, IIRC
>> this was due to a OSGI issue related to the BSF jar.
>>
>> In APIM, since we wanted to ship the javascript based dummy API
>> functionality in the 1.7.0 release, we had to modify the script mediator to
>> omit BSF and use the Rhino Engine directly. This lead to the script
>> mediator breaking for other types of scripts.
>>
>> I believe this is scheduled to be fixed in the coming versions of APIM.
>>
>> Thanks and Regards,
>>
>> Ruwan Yatawara
>>
>> Senior Software Engineer,
>> WSO2 Inc.
>>
>> email : ruw...@wso2.com
>> mobile : +94 77 9110413
>> blog : http://ruwansrants.blogspot.com/
>> www: :http://wso2.com
>>
>>
>> On Wed, Oct 14, 2015 at 2:56 AM, Isuru Udana <isu...@wso2.com> wrote:
>>
>>> Hi Shenavi,
>>>
>>> I think script mediator functionality has been broken from API Manager
>>> version 1.7.0.
>>> There was some change done in API Manager synapse branch which made
>>> script mediator to work only with Javascript.
>>>
>>> Thanks.
>>>
>>> On Tue, Oct 13, 2015 at 7:04 AM, Shenavi de Mel <shen...@wso2.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I was trying to write a groovy script mediator to be executed within an
>>>> API hosted in the API Manager 1.9.1 locally and i am getting the following
>>>> error on my console. I have attached the full stack trace in this mail.
>>>>
>>>> {ERROR}
>>>>
>>>> [2015-10-13 18:10:56,987] ERROR - ScriptMediator No script engine found
>>>> for language: groovy
>>>> [2015-10-13 18:10:56,988] ERROR - CarbonDeploymentSchedulerTask Error
>>>> while running deployment scheduler..
>>>> org.apache.synapse.SynapseException: No script engine found for
>>>> language: groovy
>>>>
>>>> {ERROR}
>>>>
>>>> This is the script i included in the in sequence which was a simple
>>>> script to check if it works.
>>>>
>>>>     <script language="groovy">println "The current time is: ${new
>>>> Date()}"</script>
>>>>
>>>> I have also included the groovy-all-1.1-rc-1.jar into
>>>> APIM_HOME/repository/components/lib/ and i checked the OSGI service and it
>>>> is active as well.
>>>>
>>>> When i tried this scenario as mentioned in the blog [1] for the ESB i
>>>> was able to get the result successfully. Do i need to add any other
>>>> dependencies to the API Manager to support groovy?
>>>>
>>>> Your help would be much appreciated.
>>>>
>>>> [1]
>>>> http://heshans.blogspot.com/2011/05/executing-groovy-scripts-using-wso2-esb.html
>>>>
>>>> Thanks
>>>> Shenavi
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> *Isuru Udana*
>>> Associate Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> email: isu...@wso2.com cell: +94 77 3791887
>>> blog: http://mytecheye.blogspot.com/
>>>
>>
>>
>


-- 
Nuwan Dias

Technical Lead - WSO2, Inc. http://wso2.com
email : nuw...@wso2.com
Phone : +94 777 775 729
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to