I have a Database table GroovyTest as following :-

As you can see it has 4 fields :- ID, NAME,AGE and DESIGNATION and among them ID and AGE are integer type and remaining NAME and DESIGNATION are String
Now I have the following Mule flow which is trying to insert the values in this DB using Groovy Script:-
<flow name="GroovyWithJDBCFlow1" doc:name="GroovyWithJDBCFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="groovy" doc:name="HTTP"/>
<scripting:component doc:name="Initialise Database">
<scripting:script engine="Groovy">
<scripting:text><![CDATA[
jdbcConnector = muleContext.getRegistry().lookupConnector("Database_Global");
qr = jdbcConnector.getQueryRunner();
conn = jdbcConnector.getConnection();
qr.update(conn, "INSERT INTO GroovyTest VALUES(message.getInboundProperty('id'),message.getInboundProperty('name'),message.getInboundProperty('age'),message.getInboundProperty('designation'))")
return "Inserted into Table";]]></scripting:text>
</scripting:script>
</scripting:component>
</flow>
Now when I trigger the flow with following url :- http://localhost:8082/groovy/?method=insert&id=1&name=Anirban&age=29&designation=SoftwareEngineer
I am getting following exception :-
Root Exception stack trace:
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find either column "message" or the user-defined function or aggregate "message.getInboundProperty", or the name is ambiguous.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
But if I hardcode the value as following :-qr.update(conn, "INSERT INTO GroovyTest VALUES(5,'testvalue',333,'test')"); it's getting inserted without any issue ..
Also I checked the log .. I am getting all the inbound properties value correctly but I am unable to make it insert in DB using Groovy
Please help