我使用的是wso2esb 4.7.0和wso2dss 3.1.0。我的.dbs文件在wso2dss中工作,但是当我将它访问到wso2esb中时,它显示了esb终端中的移除错误,如下所示:
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>同时,在wso2dss中显示:
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: ""在客户端或curl命令中,它显示:
{"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我知道解析错误,但我不能重新分配this.What,我应该这么做吗?
发布于 2014-02-14 15:38:50
问题在于您的数据服务或您发送的请求,我相信。确保请求包含元素“限制”。似乎认为它找不到输入映射的值'limit',所以它给它分配了一个空字符串。但是sql查询需要一个整数。因此,字符串->int转换失败了。
还可以查看dbs中query部分的行,重点是输入映射。确保输入映射中的sqlType属性集是正确的。根据您的描述,它应该是一个INTEGER。
https://stackoverflow.com/questions/21751350
复制相似问题