My requirement is to read the XML from a CLOB field and parse it to get the entity.
The data config is as shown below. I am trying to map two fields 'event' and 'policyNumber' for the entity 'catreport'. <dataSource name="mbdev" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:orcl" user="xyz" password="xyz"/> <document name="insight"> <entity name="input" query="select * from test" logLevel="debug" datasource="mbdev" transformer="ClobTransformer, script:toDate"> <field column="LOAD_DATE" name="load_date" /> <field column="RESPONSE_XML" name="RESPONSE_XML" clob="true" /> <dataSource name="xmldata" type="FieldReaderDataSource"/> <entity name="catReport" dataSource="xmldata" dataField="input.RESPONSE_XML" processor="XPathEntityProcessor" forEach="/*:DecisionServiceRs" rootEntity="true" logLevel="debug"> <field column="event" xpath="/dec:DecisionServiceRs/@event"/> I am getting this error .... Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: null Processing Document # 1 at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:70) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:321) at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:278) at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:53) at org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:283) at org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:224) I see that the Clob is getting converted to String correctly and the log has this entry where xml is printed Exception while processing: input document : SolrInputDocument(fields: [RESPONSE_XML=<dec:Deci.... I do not know why the error is thrown at Jdbc when the Clob is converted to string and passed to the FieldReader and do not know how to make this work. Thanks Pattabi