[ http://wso2.org/jira/browse/ESBJAVA-417?page=comments#action_14607 ] Upul Godage commented on ESBJAVA-417: -------------------------------------
In current implemenation only properties of type String and OMElement are supported. If required, String values has to be converted to the required types in the Task class set<Property> methods. > Unable to define integer/double/float values as Task Parameters > --------------------------------------------------------------- > > Key: ESBJAVA-417 > URL: http://wso2.org/jira/browse/ESBJAVA-417 > Project: WSO2 ESB > Issue Type: Bug > Affects Versions: 1.6-QA-b2 > Environment: Ubuntu 7.04, JDK1.5.0_12, Firefox2.0.0.9 > Reporter: Evanthika Amarasiri > Assigned To: Ruwan Linton > Attachments: CalculatorTask.java > > > Created a class where two integer values are manipulated. > When creating the task, tried to set integer values to the relevant > properties and received the below exception when scheduling the task > ********************************************************************************************************************************************************************************************************************************** > 2008-01-07 13:39:04,220 [10.100.1.97-testc-ubuntu] [SimpleThreadPoolWorker-1] > DEBUG SimpleQuartzJob Executing task : synapse.simple.quartz.CalculatorTask > 2008-01-07 13:39:04,220 [10.100.1.97-testc-ubuntu] [SimpleThreadPoolWorker-1] > DEBUG SimpleQuartzJob Found Property : <syn:property > xmlns:syn="http://ws.apache.org/ns/synapse" name="x" value="10" /> > 2008-01-07 13:39:04,220 [10.100.1.97-testc-ubuntu] [SimpleThreadPoolWorker-1] > ERROR PropertyHelper Error setting property : x as a String property into > class mediator : class com.math.calc.task.CalculatorTask : > com.math.calc.task.CalculatorTask.setX(java.lang.String)com.math.calc.task.CalculatorTask.setX(java.lang.String) > 2008-01-07 13:39:04,220 [10.100.1.97-testc-ubuntu] [SimpleThreadPoolWorker-1] > ERROR JobRunShell Job synapse.simple.quartz.CalculatorTask threw an unhandled > Exception: > org.apache.synapse.SynapseException: Error setting property : x as a String > property into class mediator : class com.math.calc.task.CalculatorTask : > com.math.calc.task.CalculatorTask.setX(java.lang.String) > at > org.apache.synapse.config.xml.PropertyHelper.handleException(PropertyHelper.java:189) > at > org.apache.synapse.config.xml.PropertyHelper.setStaticProperty(PropertyHelper.java:146) > at > org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:46) > at org.quartz.core.JobRunShell.run(JobRunShell.java:202) > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) > Caused by: java.lang.NoSuchMethodException: > com.math.calc.task.CalculatorTask.setX(java.lang.String) > at java.lang.Class.getMethod(Class.java:1581) > at > org.apache.synapse.config.xml.PropertyHelper.setStaticProperty(PropertyHelper.java:138) > ... 3 more > 2008-01-07 13:39:04,221 [10.100.1.97-testc-ubuntu] [SimpleThreadPoolWorker-1] > ERROR ErrorLogger Job (synapse.simple.quartz.CalculatorTask threw an > exception. > org.quartz.SchedulerException: Job threw an unhandled exception. [See nested > exception: org.apache.synapse.SynapseException: Error setting property : x as > a String property into class mediator : class > com.math.calc.task.CalculatorTask : > com.math.calc.task.CalculatorTask.setX(java.lang.String)] > at org.quartz.core.JobRunShell.run(JobRunShell.java:213) > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) > Caused by: org.apache.synapse.SynapseException: Error setting property : x as > a String property into class mediator : class > com.math.calc.task.CalculatorTask : > com.math.calc.task.CalculatorTask.setX(java.lang.String) > at > org.apache.synapse.config.xml.PropertyHelper.handleException(PropertyHelper.java:189) > at > org.apache.synapse.config.xml.PropertyHelper.setStaticProperty(PropertyHelper.java:146) > at > org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:46) > at org.quartz.core.JobRunShell.run(JobRunShell.java:202) > ... 1 more > Caused by: java.lang.NoSuchMethodException: > com.math.calc.task.CalculatorTask.setX(java.lang.String) > at java.lang.Class.getMethod(Class.java:1581) > at > org.apache.synapse.config.xml.PropertyHelper.setStaticProperty(PropertyHelper.java:138) > ... 3 more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://wso2.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Esb-java-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
