Question

I'm using wso2esb 4.7.0 and wso2dss 3.1.0.my .dbs file working in wso2dss but when i access it into wso2esb it shows error of pasing in esb terminal like :

LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:0b6a1043-5904-4550-ba27-8e91da337bdd, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><Fault><faultcode>soapenv:Server</faultcode><faultstring>java.lang.RuntimeException: Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: logindataservice
Location: /logindataservice.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: select_all_test_operation
Current Params: {limit=}
Nested Exception:-
java.lang.NumberFormatException: For input string: ""
</faultstring><detail/></Fault></soapenv:Body></soapenv:Envelope>

At the same time in wso2dss it show:

Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: logindataservice
Location: /logindataservice.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: select_all_test_operation
Current Params: {limit=}
Nested Exception:-
java.lang.NumberFormatException: For input string: ""

and in client side or in curl command it shows :

 {"Fault":{"faultcode":"soapenv:Server","faultstring":"java.lang.RuntimeException: Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processNormalQuery'\nDS Code: DATABASE_ERROR\nSource Data Service:-\nName: logindataservice\nLocation: \/logindataservice.dbs\nDescription: N\/A\nDefault Namespace: http:\/\/ws.wso2.org\/dataservice\nCurrent Request Name: select_all_test_operation\nCurrent Params: {limit=}\nNested Exception:-\njava.lang.NumberFormatException: For input string: \"\"\n","detail":""}}* Closing connection #0

I konw ot's parsing error but i'm unble to reslove this.What should i do?

Was it helpful?

Solution

The issue is in your data service or the request you are sending I believe. Make sure the request contain the element 'limit'. It seems that Data Services Server thinks it could not find the value for your input mapping, 'limit', so it has assigned an empty string to it. But your sql query expects an integer. So, the string->int conversion has failed.

Also look in the lines of your query section in the dbs with focus on the input mappings. Make sure the sqlType attribute set in the input mapping is correct. Based on your description, it should be a INTEGER.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top