Forum Discussion

vikranthsanka15's avatar
vikranthsanka15
Occasional Contributor
10 years ago

JDBC Request Step in SoapUI not fetching the DB table data

Hi,

I wanted to connect to SQL DB through the JDBC step in SoapUI. I have given the Driver, Connection String, Password details correctly , Test Connection is also success getting me a message on dialogue box "The connection successfully Tested". But when a simple query is executed it is not fetching the DB table columns and instead I'm seeing the response like

<Results>
<ResultSet fetchSize="0">
<Row rowNumber="1">


The Query I have used is a simple Select * from a Table. The query works fine and fetches me table data in the SQL yog but its not fetching me any data in SoapUI . Please help me.

5 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Have you checked in the soapui.log/soapui-error.log files?

    From the description, the situration is little wierd as there no point that soapui could not return while other tool can give result set. May be you try again and watch logs and post with the findings.
  • vikranthsanka15's avatar
    vikranthsanka15
    Occasional Contributor
    Thanks Mr. Rao

    This is the Soapui.log

    Thu Jan 08 18:15:51 IST 2015:ERROR:An error occured [The character ' ' is an invalid XML character], see error log for details

    This is the Error.log

    Thu Jan 08 18:18:24 IST 2015:ERROR:java.io.IOException: The character ' ' is an invalid XML character
    java.io.IOException: The character ' ' is an invalid XML character
    at org.apache.xml.serialize.BaseMarkupSerializer.fatalError(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.surrogates(Unknown Source)
    at org.apache.xml.serialize.XMLSerializer.printText(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.characters(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
    at org.apache.xml.serialize.BaseMarkupSerializer.serialize(Unknown Source)
    at com.eviware.soapui.support.xml.XmlUtils.createJdbcXmlResult(XmlUtils.java:1681)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcResponse.<init>(JdbcResponse.java:38)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.createResponse(JdbcSubmit.java:334)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.runQuery(JdbcSubmit.java:199)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.run(JdbcSubmit.java:161)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
  • nmrao's avatar
    nmrao
    Champion Level 3
    So from the stacktrace it is clear that there some invalid character found. Check your data and see what is causing this.
  • vikranthsanka15's avatar
    vikranthsanka15
    Occasional Contributor
    Thank you Mr.nmRao.

    Issue is resolved, actually my query is fetching Hexadecimal value and I have changed my query like

    select hex(value) from table

    this worked after changing.
  • nmrao's avatar
    nmrao
    Champion Level 3
    Glad to know that you could resolve and proceed.