You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/06/17 06:38:37 UTC
[GitHub] [servicecomb-java-chassis] zhufeizzz opened a new issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
zhufeizzz opened a new issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837
客户端和服务端版本都是2.0.2
接口声明如下:
```
@RequestMapping(path = "/simple", method = RequestMethod.GET)
@Override
public String testSimple(String input) {
return input;
}
```
错误日志如下:
```
14:30:48.141 [main] ERROR io.protostuff.compiler.parser.ParseErrorLogger - Can not parse line 3:12 - mismatched input ':' expecting ';'
14:30:48.144 [main] ERROR org.apache.servicecomb.loadbalance.LoadbalanceHandler - execution error, msg is cause:ParserException,message:Could not parse syntax = "proto3";
import "google/protobuf/empty.proto";
package demo:cse_perf_test_server.PerfTestService;
message BaseInstance {
string id = 1;
JSONObject properties = 2;
}
message JSONObject {
bool empty = 1;
}
//@WrapProperty
message TestEmptyResponseWrap200 {
string value = 1;
}
//@WrapProperty
message TestList10ResponseWrap200 {
repeated BaseInstance value = 1;
}
//@WrapProperty
message TestList100ResponseWrap200 {
repeated BaseInstance value = 1;
}
//@WrapProperty
message TestList250ResponseWrap200 {
repeated BaseInstance value = 1;
}
//@WrapArguments
message TestSimpleRequestWrap {
string input = 1;
}
//@WrapProperty
message TestSimpleResponseWrap200 {
string value = 1;
}
service MainService {
//@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"TestEmptyResponseWrap200"}}}
rpc testEmpty (google.protobuf.Empty) returns (TestEmptyResponseWrap200);
//@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"TestList10ResponseWrap200"}}}
rpc testList10 (google.protobuf.Empty) returns (TestList10ResponseWrap200);
//@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"TestList100ResponseWrap200"}}}
rpc testList100 (google.protobuf.Empty) returns (TestList100ResponseWrap200);
//@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"TestList250ResponseWrap200"}}}
rpc testList250 (google.protobuf.Empty) returns (TestList250ResponseWrap200);
//@Rpc{"argTypeName":"TestSimpleRequestWrap","responses":{"200":{"typeName":"TestSimpleResponseWrap200"}}}
rpc testSimple (TestSimpleRequestWrap) returns (TestSimpleResponseWrap200);
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] zhufeizzz commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
zhufeizzz commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-646056201
ApplicationID是demo,冒号是ServiceComb自己拼的
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-646015406
你的application id 是 `demo:` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-645205633
你的接口定义和下面的异常消息看不出来有任何关联。 能否先使用一个简单DEMO验证下你的使用方式?避免复杂系统的影响。
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] zhufeizzz commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
zhufeizzz commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-645725393
@liubao68 找到问题了
是因为这里:“package demo:cse_perf_test_server.HighwayPerfTestService;”,因为ApplicationID后面是冒号,不符合语法规范,请看下怎么换一个分隔符。
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-646418476
按照你说的,这个问题应该是必现的问题,但实际不是。 是不是你的客户端的代码比较特殊, 能共享下你的客户端代码是怎么发起对这个服务的调用的吗?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-647253301
Fixed in https://github.com/apache/servicecomb-java-chassis/pull/1850/files and will be available at 2.1.0
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-645262609
It's a bit strange, I can not reproduce your problem. [see my code here ](https://github.com/liubao68/java-chassis/commit/c95c032cefd7c64ae22b937e86b3ad8b1d1c85d0
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] zhufeizzz commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
zhufeizzz commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-646485765
Invoker.createProxy("demo:cse-perf-test-server", "PerfTestService", PerfTestService.class);
通过这种方式调用,当指定ApplicationID时不行,如果大家ApplicationID一样不用指定则没问题
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] zhufeizzz commented on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
zhufeizzz commented on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-645211793
@liubao68 我又建了一个极简的接口一样报错
接口定义:
```
@RestSchema(schemaId = "HighwayPerfTestService")
@RequestMapping(path = ServiceConstants.SERVICE_URL_PREFIX + "/highway-perf")
public class HighwayPerfTestServiceImpl implements HighwayPerfTestService {
@RequestMapping(path = "/empty", method = RequestMethod.GET)
@Override
public String testEmpty() {
return "";
}
@RequestMapping(path = "/simple", method = RequestMethod.GET)
@Override
public String testSimple(String input) {
return input;
}
}
```
错误日志:
```
15:03:47.401 [main] ERROR io.protostuff.compiler.parser.ParseErrorLogger - Can not parse line 3:12 - mismatched input ':' expecting ';'
15:03:47.403 [main] ERROR org.apache.servicecomb.loadbalance.LoadbalanceHandler - execution error, msg is cause:ParserException,message:Could not parse syntax = "proto3";
import "google/protobuf/empty.proto";
package demo:cse_perf_test_server.HighwayPerfTestService;
//@WrapProperty
message TestEmptyResponseWrap200 {
string value = 1;
}
//@WrapArguments
message TestSimpleRequestWrap {
string input = 1;
}
//@WrapProperty
message TestSimpleResponseWrap200 {
string value = 1;
}
service MainService {
//@Rpc{"argTypeName":"google.protobuf.Empty","responses":{"200":{"typeName":"TestEmptyResponseWrap200"}}}
rpc testEmpty (google.protobuf.Empty) returns (TestEmptyResponseWrap200);
//@Rpc{"argTypeName":"TestSimpleRequestWrap","responses":{"200":{"typeName":"TestSimpleResponseWrap200"}}}
rpc testSimple (TestSimpleRequestWrap) returns (TestSimpleResponseWrap200);
}
: 1 syntax errors found
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 closed issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 closed issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1837: 2.0.2使用highway调用时报“Could not parse syntax”
Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1837:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1837#issuecomment-645205633
看起来不是你发的接口的影响导致的错误,是其他接口。 比如: BaseInstance 里面采用的 JSONObject 参数。 可以试试是不是由于这个接口影响的。
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org