Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

springmvc-sample示例程序运行失败 #106

Open
xuezechao1 opened this issue Feb 9, 2023 · 3 comments
Open

springmvc-sample示例程序运行失败 #106

xuezechao1 opened this issue Feb 9, 2023 · 3 comments

Comments

@xuezechao1
Copy link

xuezechao1 commented Feb 9, 2023

下载servicecomb-samples代码后,参考https://github.com/apache/servicecomb-samples/tree/master/java-chassis-samples/springmvc-sample教程运行providerconsumerconsumer运行失败,报错如下所示:

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
@liubao68
Copy link
Contributor

liubao68 commented Feb 9, 2023

感觉 provider 端口被其他服务占用, 没启动成功的样子。

@xuezechao1
Copy link
Author

感觉 provider 端口被其他服务占用, 没启动成功的样子。

provider没报错,查看注册中心provider也已经注册上了。

@xuezechao1
Copy link
Author

xuezechao1 commented Feb 9, 2023

感觉 provider 端口被其他服务占用, 没启动成功的样子。

更换端口后,还是会报同样的错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants