WSO2 ESB DataMapper中介

时间:2016-12-22 06:16:49

标签: wso2 wso2esb datamapper

尝试使用WSO2 ESB DataMapper介体将JSON输入转换为另一种JSON格式时,我收到以下错误。

在这里,我试图做一个非常基本的转换&如果有人能帮助我找出问题,那就表示赞赏。

[2016-12-22 10:20:15,674] ERROR - ResvsAPI DataMapper mediator : mapping failed
Error while reading input stream. Script engine unable to execute the script javax.script.ScriptException: ReferenceError: "map_S_root_S_root" is not defined in <eval> at line number 1
    at org.wso2.carbon.mediator.datamapper.engine.input.readers.JSONInputReader.read(JSONInputReader.java:62)
    at org.wso2.carbon.mediator.datamapper.engine.input.InputBuilder.buildInputModel(InputBuilder.java:59)
    at org.wso2.carbon.mediator.datamapper.engine.core.mapper.MappingHandler.doMap(MappingHandler.java:67)
    at org.wso2.carbon.mediator.datamapper.DataMapperMediator.transform(DataMapperMediator.java:306)
    at org.wso2.carbon.mediator.datamapper.DataMapperMediator.mediate(DataMapperMediator.java:256)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
    at org.apache.synapse.rest.Resource.process(Resource.java:343)
    at org.apache.synapse.rest.API.process(API.java:399)
    at org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123)
    at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101)
    at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304)
    at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:75)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
    at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
    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(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

1 个答案:

答案 0 :(得分:0)

这可能是由于输入输出映射配置中的错误。你能否提供映射UI视图的截图和映射配置文件的内容(.dmc文件) *您可以在WSO2 ESB管理控制台的“注册表查看器”选项卡中找到映射配置。