我的DSS服务有问题,因为我找不到任何问题的答案而感到沮丧。我的服务有一个sqlserver数据源,映射配置我的输出为JSON,并在使用内容类型application / json测试服务时,我收到一个错误。以下是dss碳原木。我以前遇到过这个问题,解决办法就是启用Escape Non Printable Characters,但即使我启用了它,我仍然会收到以下错误。请帮忙。
Caused by: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: FTE
Location: /FTE.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: _getusers_login
Current Params: {login=103}
Nested Exception:-
DS Fault Message: Error in XML generation at StaticOutputElement.execute
DS Code: UNKNOWN_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: Invalid Staring element
at org.wso2.carbon.dataservices.core.description.query.SQLQuery.processNormalQuery(SQLQuery.java:864)
at org.wso2.carbon.dataservices.core.description.query.SQLQuery.runQuery(SQLQuery.java:2290)
at org.wso2.carbon.dataservices.core.description.query.Query.execute(Query.java:282)
at org.wso2.carbon.dataservices.core.engine.CallQuery.executeElement(CallQuery.java:179)
at org.wso2.carbon.dataservices.core.engine.CallQueryGroup.executeElement(CallQueryGroup.java:111)
at org.wso2.carbon.dataservices.core.engine.OutputElement.execute(OutputElement.java:89)
at org.wso2.carbon.dataservices.core.description.resource.Resource.execute(Resource.java:67)
at org.wso2.carbon.dataservices.core.engine.DataService.invoke(DataService.java:462)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:96)
... 46 more
Caused by: DS Fault Message: Error in XML generation at StaticOutputElement.execute
DS Code: UNKNOWN_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: Invalid Staring element
at org.wso2.carbon.dataservices.core.engine.StaticOutputElement.executeElement(StaticOutputElement.java:258)
at org.wso2.carbon.dataservices.core.engine.OutputElement.execute(OutputElement.java:89)
at org.wso2.carbon.dataservices.core.engine.OutputElementGroup.executeElement(OutputElementGroup.java:106)
at org.wso2.carbon.dataservices.core.engine.OutputElement.execute(OutputElement.java:89)
at org.wso2.carbon.dataservices.core.description.query.Query.writeResultEntry(Query.java:396)
at org.wso2.carbon.dataservices.core.description.query.SQLQuery.processNormalQuery(SQLQuery.java:857)
... 54 more
Caused by: javax.xml.stream.XMLStreamException: Invalid Staring element
at org.apache.axis2.json.gson.GsonXMLStreamWriter.writeStartElement(GsonXMLStreamWriter.java:239)
at org.wso2.carbon.dataservices.core.engine.XMLWriterHelper.writeResultElement(XMLWriterHelper.java:144)
at org.wso2.carbon.dataservices.core.engine.StaticOutputElement.executeElement(StaticOutputElement.java:250)
... 59 more
答案 0 :(得分:1)
它也发生在我身上, 解决方案是检查我是否添加了"输出映射"是一个正确的JSON。
复制粘贴你的"输出映射" http://www.jsoneditoronline.org/处的JSON,看看格式是否正确