Exception in thread "main" InvocationException: code=405;msg=CommonExceptionData [message=method POST, path /springmvchello/sayhi/, statusCode 405, reasonPhrase Method Not Allowed, response content-type text/html;charset=iso-8859-1 is not supported]
at org.apache.servicecomb.transport.rest.client.http.DefaultHttpClientFilter.extractResponse(DefaultHttpClientFilter.java:126)
at org.apache.servicecomb.transport.rest.client.http.DefaultHttpClientFilter.afterReceiveResponse(DefaultHttpClientFilter.java:133)
at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.lambda$processResponseBody$6(RestClientInvocation.java:240)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (org.apache.servicecomb.foundation.vertx.stream.BufferInputStream); line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2337)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:710)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:635)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2691)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:870)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:762)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4684)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4586)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3601)
at org.apache.servicecomb.common.rest.codec.produce.ProduceJsonProcessor.doDecodeResponse(ProduceJsonProcessor.java:64)
at org.apache.servicecomb.common.rest.codec.produce.ProduceProcessor.decodeResponse(ProduceProcessor.java:76)
at org.apache.servicecomb.transport.rest.client.http.DefaultHttpClientFilter.extractResponse(DefaultHttpClientFilter.java:104)
... 7 more
下载
servicecomb-samples
代码后,参考https://github.com/apache/servicecomb-samples/tree/master/java-chassis-samples/springmvc-sample
教程运行provider
和consumer
,consumer
运行失败,报错如下所示: