I’m using webMethods 10. I’m using the “pub.flatFile.convertToValues” to parse a CSV file and insert the records into a MySQL database. I defined my dictionary and schema and then ran my service, only to discover the inserts fail because one of my columns is a number and the parsing is treating it as a string.
Then I changed the “Data Type” of the field taht should be numeric to “java.lang.Integer” in my dictionary definition (see screen shot). THen i re-ran my flow service and got the same result …
com.wm.pkg.art.error.DetailedServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service demos.services:batchInsertPersonService.
ClassCast Exception for field: eid. Error: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:129)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:120)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:112)
at com.wm.pkg.art.ns.AdapterServiceNode.invokeService(AdapterServiceNode.java:419)
at com.wm.pkg.art.ns.ARTNSService.baseInvoke(ARTNSService.java:60)
What’s the right way to edit my dictionary/schema so that this particular field is treated as an Integer and not a String?