Index: grails-app/services/com/lemans/ds/attribute/AttributeService.groovy =================================================================== diff -u -ra4c2166b216313d043f787f148eabffa853ba220 -r757a0e89edba66b0b27b69a4ce307b81de827028 --- grails-app/services/com/lemans/ds/attribute/AttributeService.groovy (.../AttributeService.groovy) (revision a4c2166b216313d043f787f148eabffa853ba220) +++ grails-app/services/com/lemans/ds/attribute/AttributeService.groovy (.../AttributeService.groovy) (revision 757a0e89edba66b0b27b69a4ce307b81de827028) @@ -4,6 +4,8 @@ import groovy.json.JsonSlurper import org.json.XML +import java.sql.Clob + /** * Created by vramisetti on 8/18/2017. */ @@ -66,7 +68,7 @@ private Map addGroupingAttr(Map criteria, Map data) { JsonSlurper slurper = new JsonSlurper() data.results.each { - it[criteria.groupingAttrName] = slurper.parseText(XML.toJSONArray(it.attributes.characterStream.text).toString()).attributes + it[criteria.groupingAttrName] = it.attributes instanceof Clob ? slurper.parseText(XML.toJSONArray(it.attributes.characterStream.text).toString()).attributes : it.attributes it.remove('attributes') } data