[EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

Senuwan Withana
Hi Team,

I need to get the latest record ID from the database table. In order to get that record, I have used the below SQL statement. 

SELECT MAX(RECORD_ID) FROM Customer;

Above query executed fine and results retrieved correctly.

However When I tried to execute same query on WSO2 EI DSS, I got below exceptions.



 <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
   </query>

 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
      </call-query>
   </operation>


I would like to know the reason why this error comes and how to avoid this error.

Error Log

                                
Current Request Name: GetLastRecord
Current Params: {}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "eb3[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "e"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "b"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "3"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "<"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Default Namespace: <a href="http://ws.wso2.org/dataservice[\n]">http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Params: {}[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: <a href="http://ws.wso2.org/dataservice[\n]">http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {}[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "0"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 10:24:16,292] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: 94773212853
Web: http://www.wso2.com



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

Nandika Jayawardana
Hi Senuwan,

Your query implementation does not have an output mapping. You need to define how the results from the executed sql query map to the response XML message. 

Following is an example query.

 <query id="getMaxCreditLimit" useConfig="default">
      <sql>select MAX(creditLimit) as maxCreditLimit from Customers</sql>
      <result element="Customers" rowName="creditLimit">
         <element column="maxCreditLimit" name="MaxCreditLimit" xsdType="integer"/>
      </result>
   </query>


Regards
Nandika


On Sat, Dec 16, 2017 at 10:26 AM, Senuwan Withana <[hidden email]> wrote:
Hi Team,

I need to get the latest record ID from the database table. In order to get that record, I have used the below SQL statement. 

SELECT MAX(RECORD_ID) FROM Customer;

Above query executed fine and results retrieved correctly.

However When I tried to execute same query on WSO2 EI DSS, I got below exceptions.



 <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
   </query>

 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
      </call-query>
   </operation>


I would like to know the reason why this error comes and how to avoid this error.

Error Log

                                
Current Request Name: GetLastRecord
Current Params: {}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "eb3[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "e"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "b"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "3"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "<"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Params: {}[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {}[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "0"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 10:24:16,292] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: <a href="tel:077%20321%202853" value="+94773212853" target="_blank">94773212853
Web: http://www.wso2.com



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Nandika Jayawardana
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

Senuwan Withana
Thanks for the update.
I added query parameter and tested, but still I got same error.


  <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
      <param name="RECORD_ID" sqlType="INTEGER"/>
   </query>
 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
         <with-param name="RECORD_ID" query-param="GetRow"/>
      </call-query>


-------------------------------------------------------------------------------------------


[2017-12-16 16:42:39,216] [EI-Core] DEBUG - header >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "12f[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "0"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "12f[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "0[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,225] [EI-Core] ERROR - DBInOnlyMessageReceiver Error in in-only message receiver
DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:118)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
... 12 more
[2017-12-16 16:42:39,227] [EI-Core] ERROR - ServerWorker Error processing POST request for : /services/CARAPP.SOAP12Endpoint/GetLastRecord
org.apache.axis2.AxisFault: DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.DBUtils.createAxisFault(DBUtils.java:740)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:58)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "ef8[\r][\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: <a href="http://ws.wso2.org/dataservice[\n]">http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - content << "e"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "f"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "8"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "<"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Default Namespace: <a href="http://ws.wso2.org/dataservice[\n]">http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "0"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - header << "[\r][\n]"


Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: 94773212853
Web: http://www.wso2.com



On Sat, Dec 16, 2017 at 4:15 PM, Nandika Jayawardana <[hidden email]> wrote:
Hi Senuwan,

Your query implementation does not have an output mapping. You need to define how the results from the executed sql query map to the response XML message. 

Following is an example query.

 <query id="getMaxCreditLimit" useConfig="default">
      <sql>select MAX(creditLimit) as maxCreditLimit from Customers</sql>
      <result element="Customers" rowName="creditLimit">
         <element column="maxCreditLimit" name="MaxCreditLimit" xsdType="integer"/>
      </result>
   </query>


Regards
Nandika


On Sat, Dec 16, 2017 at 10:26 AM, Senuwan Withana <[hidden email]> wrote:
Hi Team,

I need to get the latest record ID from the database table. In order to get that record, I have used the below SQL statement. 

SELECT MAX(RECORD_ID) FROM Customer;

Above query executed fine and results retrieved correctly.

However When I tried to execute same query on WSO2 EI DSS, I got below exceptions.



 <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
   </query>

 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
      </call-query>
   </operation>


I would like to know the reason why this error comes and how to avoid this error.

Error Log

                                
Current Request Name: GetLastRecord
Current Params: {}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "eb3[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "e"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "b"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "3"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "<"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Params: {}[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {}[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "0"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 10:24:16,292] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: <a href="tel:077%20321%202853" value="+94773212853" target="_blank">94773212853
Web: http://www.wso2.com



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Nandika Jayawardana
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

Shazni Nazeer
Hi Senuwan,

What you need is something like below. As Nandika mentioned you need to add a <result> for output mapping.

   <query id="GetMaxIdQuery" useConfig="MySQLTest">
      <sql>SELECT MAX(RECORD_ID) FROM employee_id;</sql>
      <result element="max_element" rowName="max_id">
         <element column="MAX(RECORD_ID)" name="max_id_value" xsdType="string"/>
      </result>
   </query>
   <operation name="GetMaxOp">
      <call-query href="GetMaxIdQuery"/>
   </operation>

On Sat, Dec 16, 2017 at 5:18 AM, Senuwan Withana <[hidden email]> wrote:
Thanks for the update.
I added query parameter and tested, but still I got same error.


  <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
      <param name="RECORD_ID" sqlType="INTEGER"/>
   </query>
 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
         <with-param name="RECORD_ID" query-param="GetRow"/>
      </call-query>


-------------------------------------------------------------------------------------------


[2017-12-16 16:42:39,216] [EI-Core] DEBUG - header >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "12f[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "0"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "12f[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "0[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,225] [EI-Core] ERROR - DBInOnlyMessageReceiver Error in in-only message receiver
DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:118)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
... 12 more
[2017-12-16 16:42:39,227] [EI-Core] ERROR - ServerWorker Error processing POST request for : /services/CARAPP.SOAP12Endpoint/GetLastRecord
org.apache.axis2.AxisFault: DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.DBUtils.createAxisFault(DBUtils.java:740)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:58)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "ef8[\r][\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - content << "e"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "f"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "8"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "<"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "0"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - header << "[\r][\n]"


Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: 94773212853
Web: http://www.wso2.com



On Sat, Dec 16, 2017 at 4:15 PM, Nandika Jayawardana <[hidden email]> wrote:
Hi Senuwan,

Your query implementation does not have an output mapping. You need to define how the results from the executed sql query map to the response XML message. 

Following is an example query.

 <query id="getMaxCreditLimit" useConfig="default">
      <sql>select MAX(creditLimit) as maxCreditLimit from Customers</sql>
      <result element="Customers" rowName="creditLimit">
         <element column="maxCreditLimit" name="MaxCreditLimit" xsdType="integer"/>
      </result>
   </query>


Regards
Nandika


On Sat, Dec 16, 2017 at 10:26 AM, Senuwan Withana <[hidden email]> wrote:
Hi Team,

I need to get the latest record ID from the database table. In order to get that record, I have used the below SQL statement. 

SELECT MAX(RECORD_ID) FROM Customer;

Above query executed fine and results retrieved correctly.

However When I tried to execute same query on WSO2 EI DSS, I got below exceptions.



 <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
   </query>

 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
      </call-query>
   </operation>


I would like to know the reason why this error comes and how to avoid this error.

Error Log

                                
Current Request Name: GetLastRecord
Current Params: {}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "eb3[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "e"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "b"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "3"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "<"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Params: {}[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {}[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "0"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 10:24:16,292] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: <a href="tel:077%20321%202853" value="+94773212853" target="_blank">94773212853
Web: http://www.wso2.com



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Nandika Jayawardana
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [EI-DSS] "Can not issue executeUpdate() or executeLargeUpdate() for SELECTs" error popup.

Senuwan Withana
Thanks guys,

After added following, It works. without popup errors.


  <result element="max_element" rowName="max_id">
         <element column="MAX(RECORD_ID)" name="max_id_value" xsdType="string"/>
      </result>


Thanks.

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: 94773212853
Web: http://www.wso2.com



On Sun, Dec 17, 2017 at 6:14 AM, Shazni Nazeer <[hidden email]> wrote:
Hi Senuwan,

What you need is something like below. As Nandika mentioned you need to add a <result> for output mapping.

   <query id="GetMaxIdQuery" useConfig="MySQLTest">
      <sql>SELECT MAX(RECORD_ID) FROM employee_id;</sql>
      <result element="max_element" rowName="max_id">
         <element column="MAX(RECORD_ID)" name="max_id_value" xsdType="string"/>
      </result>
   </query>
   <operation name="GetMaxOp">
      <call-query href="GetMaxIdQuery"/>
   </operation>

On Sat, Dec 16, 2017 at 5:18 AM, Senuwan Withana <[hidden email]> wrote:
Thanks for the update.
I added query parameter and tested, but still I got same error.


  <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
      <param name="RECORD_ID" sqlType="INTEGER"/>
   </query>
 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
         <with-param name="RECORD_ID" query-param="GetRow"/>
      </call-query>


-------------------------------------------------------------------------------------------


[2017-12-16 16:42:39,216] [EI-Core] DEBUG - header >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,218] [EI-Core] DEBUG - header >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - header >> "[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "12f[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "POST /services/CARAPP.SOAP12Endpoint/GetLastRecord HTTP/1.1[\r][\n]"
[2017-12-16 16:42:39,219] [EI-Core] DEBUG - content >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:GetLastRecord"[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "0"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Cookie: menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region3_registry_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG15129165207870.21963900039265616=true; MSG15130739092210.15348576819556436=true; MSG15130739810920.3014705142781514=true; MSG15130753418090.33963906683288003=true; MSG15130753619370.12255281154976705=true; MSG15130753917050.04244936775745323=true; MSG15131806233020.2276242035284045=true; MSG15131806273740.689304387480249=true; MSG15131806535940.4462982474705657=true; MSG15131806597420.8476406500277069=true; wso2.carbon.rememberme=admin-d5d1272f-b4ee-4853-b741-e87f912b4f81; JSESSIONID=70A6660D04EE2F2B733478004E9E86E4; requestedURI=../../carbon/service-mgt/index.jsp; current-breadcrumb=%2523[\r][\n]"
[2017-12-16 16:42:39,220] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "User-Agent: Axis2[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - content >> "[\r][\n]"
[2017-12-16 16:42:39,221] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Host: senuwan-ThinkPad:8280[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,222] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "12f[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:GetLastRecord xmlns:p="http://ws.wso2.org/dataservice"><xs:GetRow xmlns:xs="http://ws.wso2.org/dataservice">10</xs:GetRow></p:GetLastRecord></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "0[\r][\n]"
[2017-12-16 16:42:39,223] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 >> "[\r][\n]"
[2017-12-16 16:42:39,225] [EI-Core] ERROR - DBInOnlyMessageReceiver Error in in-only message receiver
DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:118)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
... 12 more
[2017-12-16 16:42:39,227] [EI-Core] ERROR - ServerWorker Error processing POST request for : /services/CARAPP.SOAP12Endpoint/GetLastRecord
org.apache.axis2.AxisFault: DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs


at org.wso2.carbon.dataservices.core.DBUtils.createAxisFault(DBUtils.java:740)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:58)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
DS Code: DATABASE_ERROR
Source Data Service:-
Name: CARAPP
Location: /CARAPP.dbs
Description: Connected CAR app data service.
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
Current Request Name: GetLastRecord
Current Params: {GetRow=10}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,232] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "ef8[\r][\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,233] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,234] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 16:42:39,235] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 16:42:39,236] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 16:42:39,240] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 11:12:39 GMT[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 16:42:39,241] [EI-Core] DEBUG - content << "e"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "f"
[2017-12-16 16:42:39,242] [EI-Core] DEBUG - content << "8"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "<"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns13="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns13:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 16:42:39,248] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Current Params: {GetRow=10}[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,249] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns12:DataServiceFault xmlns:axis2ns12="http://ws.wso2.org/dataservice"><axis2ns12:current_params>{GetRow=10}</axis2ns12:current_params><axis2ns12:source_data_service><axis2ns12:data_service_name>CARAPP</axis2ns12:data_service_name><axis2ns12:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns12:description><axis2ns12:location>/CARAPP.dbs</axis2ns12:location><axis2ns12:default_namespace>http://ws.wso2.org/dataservice</axis2ns12:default_namespace></axis2ns12:source_data_service><axis2ns12:ds_code>DATABASE_ERROR</axis2ns12:ds_code><axis2ns12:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns12:nested_exception><axis2ns12:current_request_name>GetLastRecord</axis2ns12:current_request_name></axis2ns12:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "0"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 16:42:39,251] [EI-Core] DEBUG - header << "[\r][\n]"


Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: 94773212853
Web: http://www.wso2.com



On Sat, Dec 16, 2017 at 4:15 PM, Nandika Jayawardana <[hidden email]> wrote:
Hi Senuwan,

Your query implementation does not have an output mapping. You need to define how the results from the executed sql query map to the response XML message. 

Following is an example query.

 <query id="getMaxCreditLimit" useConfig="default">
      <sql>select MAX(creditLimit) as maxCreditLimit from Customers</sql>
      <result element="Customers" rowName="creditLimit">
         <element column="maxCreditLimit" name="MaxCreditLimit" xsdType="integer"/>
      </result>
   </query>


Regards
Nandika


On Sat, Dec 16, 2017 at 10:26 AM, Senuwan Withana <[hidden email]> wrote:
Hi Team,

I need to get the latest record ID from the database table. In order to get that record, I have used the below SQL statement. 

SELECT MAX(RECORD_ID) FROM Customer;

Above query executed fine and results retrieved correctly.

However When I tried to execute same query on WSO2 EI DSS, I got below exceptions.



 <query id="GetLastRecord" useConfig="MYSQL">
      <sql>SELECT MAX(RECORD_ID) FROM Customer</sql>
   </query>

 <operation name="GetLastRecord">
      <call-query href="GetLastRecord">
      </call-query>
   </operation>


I would like to know the reason why this error comes and how to avoid this error.

Error Log

                                
Current Request Name: GetLastRecord
Current Params: {}
Nested Exception:-
java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs

at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:102)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:107)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.executeInOnly(DSOMDataSource.java:80)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processSingleRequest(SingleDataServiceRequest.java:116)
at org.wso2.carbon.dataservices.core.dispatch.SingleDataServiceRequest.processRequest(SingleDataServiceRequest.java:67)
at org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:357)
at org.wso2.carbon.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:41)
at org.wso2.carbon.dataservices.core.DBInOnlyMessageReceiver.invokeBusinessLogic(DBInOnlyMessageReceiver.java:53)
... 8 more
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Content-Type: application/soap+xml; charset=UTF-8; action="http://www.w3.org/2005/08/addressing/soap/fault"[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Date: Sat, 16 Dec 2017 04:54:16 GMT[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "eb3[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "Transfer-Encoding: chunked[\r][\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "e"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "b"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "3"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "<"
[2017-12-16 10:24:16,288] [EI-Core] DEBUG - content << "?xm"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault xmlns:axis2ns146="http://ws.wso2.org/dataservice"><soapenv:Code><soapenv:Value>axis2ns146:DATABASE_ERROR</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">DS Fault Message: Error in DS non result invoke.[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Current Params: {}[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,289] [EI-Core] DEBUG - content << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
[2017-12-16 10:24:16,287] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processPreNormalQuery': Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "DS Code: DATABASE_ERROR[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Source Data Service:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Name: CARAPP[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Location: /CARAPP.dbs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Description: Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                [\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Default Namespace: http://ws.wso2.org/dataservice[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Request Name: GetLastRecord[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Current Params: {}[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Nested Exception:-[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "</soapenv:Text></soapenv:Reason><soapenv:Detail><axis2ns145:DataServiceFault xmlns:axis2ns145="http://ws.wso2.org/dataservice"><axis2ns145:current_params>{}</axis2ns145:current_params><axis2ns145:source_data_service><axis2ns145:data_service_name>CARAPP</axis2ns145:data_service_name><axis2ns145:description>Connected CAR app data service.&#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                &#xd;                                </axis2ns145:description><axis2ns145:location>/CARAPP.dbs</axis2ns145:location><axis2ns145:default_namespace>http://ws.wso2.org/dataservice</axis2ns145:default_namespace></axis2ns145:source_data_service><axis2ns145:ds_code>DATABASE_ERROR</axis2ns145:ds_code><axis2ns145:nested_exception>java.sql.SQLException: Can not issue executeUpdate() or executeLargeUpdate() for SELECTs</axis2ns145:nested_exception><axis2ns145:current_request_name>GetLastRecord</axis2ns145:current_request_name></axis2ns145:DataServiceFault></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2017-12-16 10:24:16,290] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "0"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\r]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - content << "[\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - header << "[\r][\n]"
[2017-12-16 10:24:16,291] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
[2017-12-16 10:24:16,292] [EI-Core] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Thanks,

Senuwan Withana
Software Engineer - Support Team | WSO2

Email : [hidden email]
Mobile: <a href="tel:077%20321%202853" value="+94773212853" target="_blank">94773212853
Web: http://www.wso2.com



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Nandika Jayawardana
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev