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 : [email protected] mobile : +94 77 9110413 blog : http://ruwansrants.blogspot.com/ www: :http://wso2.com On Wed, Oct 14, 2015 at 2:56 AM, Isuru Udana <[email protected]> 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 <[email protected]> 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: [email protected] cell: +94 77 3791887 > blog: http://mytecheye.blogspot.com/ >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
