protostuff报错

  1. 云栖社区>
  2. 博客>
  3. 正文

protostuff报错

daleychao 2016-12-31 21:41:00 浏览617
展开阅读全文

the method mergeFrom(byte[], T, Schema<T>) in the type  is not applicable for the。。。。。

如果出现以上报错,说参数类型不匹配,RuntimeSchema和Schema类型无法转换,有很大的概率是倒包倒错了。

要注意,需要导入的是:

<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
<version>1.5.2</version>
</dependency>


<!-- https://mvnrepository.com/artifact/io.protostuff/protostuff-runtime -->
<dependency>
<groupId>io.protostuff</groupId>
<artifactId>protostuff-runtime</artifactId>
<version>1.5.2</version>
</dependency>


而不是:

<!-- https://mvnrepository.com/artifact/com.dyuproject.protostuff/protostuff-core -->
<dependency>
   
  <groupId>com.dyuproject.protostuff</groupId>
    <artifactId>protostuff-core</artifactId>
    <version>1.0.12</version>
</dependency>


注意groupId是io.protostuff,不是com.dyuproject.protostuff

网友评论

登录后评论
0/500
评论