Hi Nuwan, It seems this exception occurs in ScriptMediator.java (at org.apache.synapse.mediators.bsf - line 354) when trying to compile the script.
*compiledScript = ((Compilable) scriptEngine).compile(scriptSourceCode);* @Jasintha/ Viraj : This can be reproduced even in linux and any idea about this error? @Nuwan: The error log can be found at the workspace of the project at /.metadata/.log Thanks, Sohani Sohani Weerasinghe Software Engineer WSO2, Inc: http://wso2.com Mobile : +94 716439774 Blog :http://christinetechtips.blogspot.com/ Twitter : https://twitter.com/sohanichristine On Tue, Jul 28, 2015 at 5:43 AM, Nuwan Dias <[email protected]> wrote: > Hi, > > I'm using Developer Studio version 3.7.1 on MacOS. When I try to use the > Script Mediator within an API Resource's in-sequence, it doesn't allow me > to save the API and gives an error. The following is the error message > > *"Save failed. Following error(s) have been detected. Please see the error > log for more details.* > > *Reason:* > *Exception initializing inline script"* > > And following is the content of the javascript > > *<![CDATA[* > * var doctorId = > mc.getPayloadJSON().createChannelRecord.doctorId.toString();* > * var patientName = > mc.getPayloadJSON().createChannelRecord.patientName.toString();* > * var date = > mc.getPayloadJSON().createChannelRecord.date.toString();* > * var time = > mc.getPayloadJSON().createChannelRecord.time.toString();* > * mc.setPayloadXML(* > * <ser:createChannelRecord > xmlns:ser="http://com.example.service/ <http://com.example.service/>">* > * <doctorId>{doctorId}</doctorId>* > * <patientName>{patientName}</patientName>* > * <date>{date}</date>* > * <time>{time}</time>* > * </ser:createChannelRecord>* > * );* > *]]>* > > Any ideas about this error? Where can I find additional logs? The same > script works fine if I create an API using the management console of the > ESB. > > Thanks, > NuwanD. > > -- > Nuwan Dias > > Technical Lead - WSO2, Inc. http://wso2.com > email : [email protected] > Phone : +94 777 775 729 > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
