Jersey Exception : SEVERE: A message body reader for Java class

后端 未结 15 1938
说谎
说谎 2020-11-29 11:08

I have a Jersey based Rest WS which outputs JSON. I am implementing a Jersey Client to invoke the WS and consume the JSON response. The client code I have is below



        
15条回答
  •  伪装坚强ぢ
    2020-11-29 11:30

    If you are building an uberjar or "shaded jar", make sure your meta inf service files are merged. (This bit me multiple times on a dropwizard project.)

    If you are using the gradle shadowJar plugin, you want to call mergeServiceFiles() in your shadowJar target: https://github.com/johnrengelman/shadow#merging-service-files

    Not sure what the analogous commands are for maven or other build systems.

提交回复
热议问题