我遇到了wso2esb脚本调解员的问题。
没有很多症状,但有时,当运行脚本调解器时,服务会引发以下错误。
TID: [-1234] [] [2017-08-10 19:53:08,832] ERROR
{org.apache.synapse.mediators.bsf.ScriptMediator} - Error in reading script as a stream
{org.apache.synapse.mediators.bsf.ScriptMediator}
java.io.FileNotFoundException: /app/esb/wso2esb/tmp/tmp_64624484140711678.dat (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.apache.axiom.util.blob.OverflowBlob.getInputStream(OverflowBlob.java:385)
at org.apache.synapse.util.SynapseBinaryDataSource.getInputStream(SynapseBinaryDataSource.java:76)
at javax.activation.DataHandler.getInputStream(DataHandler.java:238)
at org.apache.synapse.mediators.bsf.ScriptMediator.prepareExternalScript(ScriptMediator.java:402)
at org.apache.synapse.mediators.bsf.ScriptMediator.mediateWithExternalScript(ScriptMediator.java:274)
at org.apache.synapse.mediators.bsf.ScriptMediator.invokeScript(ScriptMediator.java:237)
at org.apache.synapse.mediators.bsf.ScriptMediator.mediate(ScriptMediator.java:207)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
我在mediator中使用javaScript,然后是脚本调解器和脚本:
<property action="set"
expression="//ns0:send_message/ns0:user/ns0:now/text()"
name="NOW" scope="default" type="STRING"/>
<script function="getAuthString"
key="conf:Service/js/ETAHeaderGenerator.js" language="js"/>
这是剧本:
function getAuthString(mc) {
var data = mc.getProperty('NOW');
var md5 = hex_md5(data + hex_md5(passwordRequestFromETA));
mc.setProperty('AUTH_STRING', md5);
return "";
}
如果有人能帮助我,我真的不知道发生了什么......
先谢谢。