添加多个端点时 Wiremock 1.57 返回 Eof 异常

Wiremock 1.57 returning Eof Exception when multiple endpoints are added

我在 wiremock 中添加了两个存根端点。以下是 http://localhost:56789/__admin

的输出
{
    "mappings": [
        {
            "request": {
                "urlPath": "/encryption/v1/decrypt/",
                "method": "GET"
            },
            "response": {
                "status": 0,
                "body": "{\"message\":null,\"httpStatus\":0,\"status\":{\"httpStatusCode\":200,\"success\":true,\"errors\":[]},\"_metaData\":{\"urlParams\":{}},\"debugData\":null,\"data\":[\"01125851014\",\"01125851014\",\"debraj.manna@jabong.com\",\"03325853088\",\"03325853088\",\"debraj.manna@rediffmail.com\"],\"httpStatusToBeReturned\":200}"
            }
        },
        {
            "request": {
                "urlPath": "/orders/v1/ordersearch/",
                "method": "GET"
            },
            "response": {
                "status": 200,
                "body": "{\"message\":null,\"httpStatus\":0,\"status\":{\"httpStatusCode\":200,\"success\":true,\"errors\":null},\"_metaData\":{\"urlParams\":{}},\"data\":{\"order\":[{\"addmismatch\":1,\"address\":[{\"add1\":\"testaddress1\",\"add2\":\"\",\"addtype\":\"0\",\"altphone\":\"\",\"city\":\"Gurgaon\",\"comp\":\"\",\"country\":\"\",\"custaddreg\":\"\",\"firstname\":\"testFirst\",\"midname\":\"\",\"lastName\":\"testLast\",\"isbill\":1,\"phone\":\"9zMoRQYv8fPYMHokQ3Z83+8//mGW5IbDjRTArpSvmW0=\",\"postcode\":\"122001\",\"prefix\":\"\",\"shippartagent\":0},{\"add1\":\"Shipping\",\"add2\":\"Updated\",\"addtype\":\"0\",\"altphone\":\"01125851014\",\"city\":\"Kadamtala\",\"comp\":\"\",\"country\":\"\",\"custaddreg\":\"\",\"firstname\":\"Tested\",\"midname\":\"\",\"lastName\":\"Tested\",\"isbill\":0,\"phone\":\"9zMoRQYv8fPYMHokQ3Z83+8//mGW5IbDjRTArpSvmW0=\",\"postcode\":\"744103\",\"prefix\":\"\",\"shippartagent\":0}],\"affpartner\":1,\"appversion\":\"\",\"ccavenueord\":\"\",\"ccretrial\":0,\"corpcurrvalue\":\"0.00\",\"corpordiden\":\"\",\"corptransid\":\"\",\"couponcode\":\"\",\"created\":\"\",\"customer\":{\"email\":\"zryLbw62xF5dLFujFTFAyRVgyY3jQtA6gjJNOXb6N80=\",\"id\":11584369,\"iscorporate\":\"\",\"firstname\":\"LEGACY\",\"lastname\":\"LEGACY\",\"phone\":\"\",\"sessionId\":\"\",\"idMd5\":null},\"deviceid\":\"\",\"finance\":{\"codcharge\":null,\"grandtotal\":\"975.00\",\"shipamnt\":\"100.00\",\"shipdisamnt\":null,\"taxamnt\":\"15.97\",\"gwamnt\":null},\"gift\":{},\"invoice\":{\"file\":\"\",\"num\":\"\"},\"ip\":\"205.147.97.67\",\"isrecur\":0,\"items\":[{\"addtext\":\"\",\"addwarehouse\":\"\",\"bitmap\":\"\",\"bundpackid\":\"\",\"bundpckidfier\":\"\",\"cancelAmt\":\"\",\"catatroptglobordty\":\"\",\"disccap\":\"\",\"discounts\":{\"bunddisc\":\"0.00\",\"cartruledisc\":\"0.00\",\"coupcat\":0,\"coupmonval\":\"0.00\",\"coupprcnt\":0,\"gccreditval\":\"1.00\",\"storcredit\":\"0.00\"},\"disploc\":\"Warehouse\",\"disptime\":3,\"dlvtime\":\"7-8\",\"expdilvdate\":\"2016-03-21 0:00:00\",\"finance\":{\"corpcurrval\":\"\",\"custcost\":\"\",\"lastamtpd\":\"\",\"orguntpr\":\"\",\"paidPr\":\"774.00\",\"paybkcrval\":\"\",\"shipcharge\":\"100.00\",\"taxAmt\":\"0.00\",\"taxpercent\":\"0.00\",\"untpr\":\"775.00\",\"vatamt\":\"0.00\",\"storcredit\":null,\"invinctax\":0.0,\"taxrate\":0.0,\"spextax\":0.0,\"collectamt\":0.0,\"commrate\":0.0,\"commamt\":0.0,\"recComm\":0.0,\"splservicecharge\":0.0},\"holidaycnt\":\"\",\"iscancel\":0,\"iscancelable\":1,\"iscancelmsg\":\"\",\"iscod\":0,\"iscustom\":0,\"isdatechange\":0,\"isfreebie\":0,\"isgiftwrap\":0,\"ispbkref\":0,\"isreturn\":0,\"isreturnable\":0,\"issurface\":1,\"isreturnmsg\":\"\",\"isvatchard\":0,\"isxchang\":0,\"isxchangmsg\":\"\",\"itemId\":70969623,\"lastStatusDate\":\"2016-03-11 15:07:24\",\"margin\":\"\",\"merchant\":\"\",\"mercorder\":\"\",\"mod\":\"\",\"mop\":\"\",\"mpmerchant\":\"\",\"name\":\"Narangi & Nagkesar Facial Ubtan 50 Gms\",\"notbuy\":\"\",\"packid\":\"\",\"packqty\":\"\",\"pbkearn\":\"\",\"preordcampname\":\"\",\"preorddispdt\":\"\",\"processtime\":\"\",\"refmoney\":\"0.00\",\"refvouch\":\"0.00\",\"returnAmt\":\"\",\"rewdpts\":\"\",\"ruledispname\":\"\",\"ship\":{\"carrier\":0,\"expshppart\":\"\",\"ismultiship\":\"\",\"shipment\":\"\",\"shipty\":\"Own Warehouse\",\"statchange\":\"\",\"splservicetype\":null,\"splserviceexpectdeldate\":null},\"shipliabty\":\"\",\"sku\":\"FO009BE75LEAINDFAS-447108\",\"skubundle\":0,\"status\":\"cancelled_cc\",\"weight\":\"\",\"qty\":1,\"created\":null,\"sellersku\":\"123232\",\"SellerId\":0},{\"addtext\":\"\",\"addwarehouse\":\"\",\"bitmap\":\"\",\"bundpackid\":\"\",\"bundpckidfier\":\"\",\"cancelAmt\":\"\",\"catatroptglobordty\":\"\",\"disccap\":\"\",\"discounts\":{\"bunddisc\":\"0.00\",\"cartruledisc\":\"0.00\",\"coupcat\":0,\"coupmonval\":\"0.00\",\"coupprcnt\":0,\"gccreditval\":\"0.00\",\"storcredit\":\"0.00\"},\"disploc\":\"Warehouse\",\"disptime\":3,\"dlvtime\":\"7-8\",\"expdilvdate\":\"2016-03-21 0:00:00\",\"finance\":{\"corpcurrval\":\"\",\"custcost\":\"\",\"lastamtpd\":\"\",\"orguntpr\":\"\",\"paidPr\":\"875.00\",\"paybkcrval\":\"\",\"shipcharge\":\"100.00\",\"taxAmt\":\"0.00\",\"taxpercent\":\"0.00\",\"untpr\":\"875.00\",\"vatamt\":\"0.00\",\"storcredit\":null,\"invinctax\":0.0,\"taxrate\":0.0,\"spextax\":0.0,\"collectamt\":0.0,\"commrate\":0.0,\"commamt\":0.0,\"recComm\":0.0,\"splservicecharge\":0.0},\"holidaycnt\":\"\",\"iscancel\":0,\"iscancelable\":1,\"iscancelmsg\":\"\",\"iscod\":0,\"iscustom\":0,\"isdatechange\":0,\"isfreebie\":0,\"isgiftwrap\":0,\"ispbkref\":0,\"isreturn\":0,\"isreturnable\":0,\"issurface\":1,\"isreturnmsg\":\"\",\"isvatchard\":0,\"isxchang\":0,\"isxchangmsg\":\"\",\"itemId\":70969624,\"lastStatusDate\":\"2016-03-11 15:08:18\",\"margin\":\"\",\"merchant\":\"\",\"mercorder\":\"\",\"mod\":\"\",\"mop\":\"\",\"mpmerchant\":\"\",\"name\":\"Tejasvi Milk Facial Ubtan 50 Gm\",\"notbuy\":\"\",\"packid\":\"\",\"packqty\":\"\",\"pbkearn\":\"\",\"preordcampname\":\"\",\"preorddispdt\":\"\",\"processtime\":\"\",\"refmoney\":\"0.00\",\"refvouch\":\"0.00\",\"returnAmt\":\"\",\"rewdpts\":\"\",\"ruledispname\":\"\",\"ship\":{\"carrier\":0,\"expshppart\":\"\",\"ismultiship\":\"\",\"shipment\":\"\",\"shipty\":\"Own Warehouse\",\"statchange\":\"\",\"splservicetype\":null,\"splserviceexpectdeldate\":null},\"shipliabty\":\"\",\"sku\":\"FO009BE76LDZINDFAS-447107\",\"skubundle\":0,\"status\":\"cancelled_cc\",\"weight\":\"\",\"qty\":1,\"created\":null,\"sellersku\":\"123232\",\"SellerId\":0}],\"mobileverf\":\"\",\"oldRef\":\"\",\"orderId\":41006021,\"orderNr\":\"160311346938664\",\"parentordid\":41006021,\"paymethod\":\"CcAvenue\",\"process\":\"\",\"ship\":{\"shipdelaydays\":0,\"partneragentname\":null,\"partneragentcode\":null,\"partneragentphone\":null},\"status\":{\"success\":false},\"storeid\":0,\"trsticket\":\"\",\"updated\":\"2016-03-11 15:08:13\",\"userdevtype\":\"mobile\",\"utmcampaignid\":\"\",\"domain\":\"wsoa\",\"earnmethod\":\"jrewards\",\"itemCustomization\":null,\"iscancel\":0,\"isreturn\":0,\"isxchang\":0,\"isPickup\":0,\"customerSegments\":null,\"odrstatus\":0,\"fkcorporatecustomer\":0,\"agentcampaign\":null},{\"addmismatch\":1,\"address\":[{\"add1\":\"testaddress1\",\"add2\":\"\",\"addtype\":\"0\",\"altphone\":\"\",\"city\":\"Gurgaon\",\"comp\":\"\",\"country\":\"\",\"custaddreg\":\"\",\"firstname\":\"testFirst\",\"midname\":\"\",\"lastName\":\"testLast\",\"isbill\":1,\"phone\":\"5Qa6Rwor34cuaLKgjskeQ3G/0WnGArDHSl/JmuMfwxA=\",\"postcode\":\"122001\",\"prefix\":\"\",\"shippartagent\":0},{\"add1\":\"Shipping\",\"add2\":\"Updated\",\"addtype\":\"0\",\"altphone\":\"01125851014\",\"city\":\"Kadamtala\",\"comp\":\"\",\"country\":\"\",\"custaddreg\":\"\",\"firstname\":\"Tested\",\"midname\":\"\",\"lastName\":\"Tested\",\"isbill\":0,\"phone\":\"5Qa6Rwor34cuaLKgjskeQ3G/0WnGArDHSl/JmuMfwxA=\",\"postcode\":\"744103\",\"prefix\":\"\",\"shippartagent\":0}],\"affpartner\":1,\"appversion\":\"\",\"ccavenueord\":\"\",\"ccretrial\":0,\"corpcurrvalue\":\"0.00\",\"corpordiden\":\"\",\"corptransid\":\"\",\"couponcode\":\"\",\"created\":\"\",\"customer\":{\"email\":\"NiJkjFQy2A6tySZAlxLKrVZtLQ2nbqm5WHbVrh9gMng=\",\"id\":11584369,\"iscorporate\":\"\",\"firstname\":\"LEGACY\",\"lastname\":\"LEGACY\",\"phone\":\"\",\"sessionId\":\"\",\"idMd5\":null},\"deviceid\":\"\",\"finance\":{\"codcharge\":null,\"grandtotal\":\"874.00\",\"shipamnt\":\"100.00\",\"shipdisamnt\":null,\"taxamnt\":\"15.97\",\"gwamnt\":null},\"gift\":{},\"invoice\":{\"file\":\"\",\"num\":\"\"},\"ip\":\"205.147.97.67\",\"isrecur\":0,\"items\":[{\"addtext\":\"\",\"addwarehouse\":\"\",\"bitmap\":\"\",\"bundpackid\":\"\",\"bundpckidfier\":\"\",\"cancelAmt\":\"\",\"catatroptglobordty\":\"\",\"disccap\":\"\",\"discounts\":{\"bunddisc\":\"0.00\",\"cartruledisc\":\"0.00\",\"coupcat\":0,\"coupmonval\":\"0.00\",\"coupprcnt\":0,\"gccreditval\":\"1.00\",\"storcredit\":\"0.00\"},\"disploc\":\"Warehouse\",\"disptime\":3,\"dlvtime\":\"7-8\",\"expdilvdate\":\"2016-03-21 0:00:00\",\"finance\":{\"corpcurrval\":\"\",\"custcost\":\"\",\"lastamtpd\":\"\",\"orguntpr\":\"\",\"paidPr\":\"774.00\",\"paybkcrval\":\"\",\"shipcharge\":\"100.00\",\"taxAmt\":\"0.00\",\"taxpercent\":\"0.00\",\"untpr\":\"775.00\",\"vatamt\":\"0.00\",\"storcredit\":null,\"invinctax\":0.0,\"taxrate\":0.0,\"spextax\":0.0,\"collectamt\":0.0,\"commrate\":0.0,\"commamt\":0.0,\"recComm\":0.0,\"splservicecharge\":0.0},\"holidaycnt\":\"\",\"iscancel\":0,\"iscancelable\":1,\"iscancelmsg\":\"\",\"iscod\":0,\"iscustom\":0,\"isdatechange\":0,\"isfreebie\":0,\"isgiftwrap\":0,\"ispbkref\":0,\"isreturn\":0,\"isreturnable\":0,\"issurface\":1,\"isreturnmsg\":\"\",\"isvatchard\":0,\"isxchang\":0,\"isxchangmsg\":\"\",\"itemId\":70969623,\"lastStatusDate\":\"2016-03-11 15:07:24\",\"margin\":\"\",\"merchant\":\"\",\"mercorder\":\"\",\"mod\":\"\",\"mop\":\"\",\"mpmerchant\":\"\",\"name\":\"Narangi & Nagkesar Facial Ubtan 50 Gms\",\"notbuy\":\"\",\"packid\":\"\",\"packqty\":\"\",\"pbkearn\":\"\",\"preordcampname\":\"\",\"preorddispdt\":\"\",\"processtime\":\"\",\"refmoney\":\"0.00\",\"refvouch\":\"0.00\",\"returnAmt\":\"\",\"rewdpts\":\"\",\"ruledispname\":\"\",\"ship\":{\"carrier\":0,\"expshppart\":\"\",\"ismultiship\":\"\",\"shipment\":\"\",\"shipty\":\"Own Warehouse\",\"statchange\":\"\",\"splservicetype\":null,\"splserviceexpectdeldate\":null},\"shipliabty\":\"\",\"sku\":\"FO009BE75LEAINDFAS-447108\",\"skubundle\":0,\"status\":\"cancelled_cc\",\"weight\":\"\",\"qty\":1,\"created\":null,\"sellersku\":\"123232\",\"SellerId\":0}],\"mobileverf\":\"\",\"oldRef\":\"\",\"orderId\":41006020,\"orderNr\":\"160311346396646\",\"parentordid\":41006020,\"paymethod\":\"CcAvenue\",\"process\":\"\",\"ship\":{\"shipdelaydays\":0,\"partneragentname\":null,\"partneragentcode\":null,\"partneragentphone\":null},\"status\":{\"success\":false},\"storeid\":0,\"trsticket\":\"\",\"updated\":\"2016-03-11 15:07:19\",\"userdevtype\":\"mobile\",\"utmcampaignid\":\"\",\"domain\":\"wsoa\",\"earnmethod\":\"jrewards\",\"itemCustomization\":null,\"iscancel\":0,\"isreturn\":0,\"isxchang\":0,\"isPickup\":0,\"customerSegments\":null,\"odrstatus\":0,\"fkcorporatecustomer\":0,\"agentcampaign\":null}]},\"total\":0,\"httpStatusToBeReturned\":200}"
            }
        }
    ]
}

端点 /orders/v1/ordersearch/ 工作正常。但是每当我试图通过在 http://localhost:56789/encryption/v1/decrypt/?q=9zMoRQYv8fPYMHokQ3Z83%2B8%2F%2FmGW5IbDjRTArpSvmW0%3D=&q=9zMoRQYv8fPYMHokQ3Z83%2B8%2F%2FmGW5IbDjRTArpSvmW0%3D&q=zryLbw62xF5dLFujFTFAyRVgyY3jQtA6gjJNOXb6N80%3D&q=5Qa6Rwor34cuaLKgjskeQ3G%2F0WnGArDHSl%2FJmuMfwxA%3D&q=5Qa6Rwor34cuaLKgjskeQ3G%2F0WnGArDHSl%2FJmuMfwxA%3D&q=NiJkjFQy2A6tySZAlxLKrVZtLQ2nbqm5WHbVrh9gMng%3D 上执行 GET 请求向 /orders/v1/ordersearch/ 发送请求后向 /encryption/v1/decrypt/ 发送请求时。它给我 jetty.eofException 如下所示:-

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 wiremock.org.mortbay.jetty.EofException</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /encryption/v1/decrypt/. Reason:
<pre>    wiremock.org.mortbay.jetty.EofException</pre></p><h3>Caused by:</h3><pre>java.lang.RuntimeException: wiremock.org.mortbay.jetty.EofException
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.writeAndTranslateExceptions(Jetty6HandlerDispatchingServlet.java:134)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.applyResponse(Jetty6HandlerDispatchingServlet.java:124)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.service(Jetty6HandlerDispatchingServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at wiremock.org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at wiremock.org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
    at wiremock.org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    at wiremock.org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at wiremock.org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at wiremock.org.mortbay.jetty.Server.handle(Server.java:326)
    at wiremock.org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at wiremock.org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
    at wiremock.org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at wiremock.org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at wiremock.org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at wiremock.org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
    at com.github.tomakehurst.wiremock.jetty6.DelayableSocketConnector.run(DelayableSocketConnector.java:49)
    at wiremock.org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: wiremock.org.mortbay.jetty.EofException
    at wiremock.org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:273)
    at wiremock.org.mortbay.jetty.HttpConnection.commitResponse(HttpConnection.java:632)
    at wiremock.org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:1011)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.writeAndTranslateExceptions(Jetty6HandlerDispatchingServlet.java:131)
    ... 17 more
</pre>
<h3>Caused by:</h3><pre>wiremock.org.mortbay.jetty.EofException
    at wiremock.org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:273)
    at wiremock.org.mortbay.jetty.HttpConnection.commitResponse(HttpConnection.java:632)
    at wiremock.org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:1011)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.writeAndTranslateExceptions(Jetty6HandlerDispatchingServlet.java:131)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.applyResponse(Jetty6HandlerDispatchingServlet.java:124)
    at com.github.tomakehurst.wiremock.jetty6.Jetty6HandlerDispatchingServlet.service(Jetty6HandlerDispatchingServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at wiremock.org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at wiremock.org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
    at wiremock.org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    at wiremock.org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at wiremock.org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at wiremock.org.mortbay.jetty.Server.handle(Server.java:326)
    at wiremock.org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at wiremock.org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
    at wiremock.org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at wiremock.org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at wiremock.org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at wiremock.org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
    at com.github.tomakehurst.wiremock.jetty6.DelayableSocketConnector.run(DelayableSocketConnector.java:49)
    at wiremock.org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>                                                
<br/>                                                
</body>
</html>

有人可以让我知道我这边是否存在配置错误或者 Wiremock 方面的一些众所周知的问题吗?

我的代码有问题。我在 /encryption/v1/decrypt/.

中错误地将 status 设置为 0
ResponseDefinitionBuilder responseBuilder = aResponse().withStatus(0);

这个在映射输出中也可见:-

"mappings": [
        {
            "request": {
                "urlPath": "/encryption/v1/decrypt/",
                "method": "GET"
            },
            "response": {
                "status": 0,
                "body": "{\"message\":null,\"httpStatus\":0,\"status\":{\"httpStatusCode\":200,\"success\":true,\"errors\":[]},\"_metaData\":{\"urlParams\":{}},\"debugData\":null,\"data\":[\"01125851014\",\"01125851014\",\"debraj.manna@jabong.com\",\"03325853088\",\"03325853088\",\"debraj.manna@rediffmail.com\"],\"httpStatusToBeReturned\":200}"
            }
        },
  ....