понеділок, 16 квітня 2012 р.

Jersey as yout REST impl in standalone app

Just today morning I wrote a simple standalone application which works with REST as a server (and client). Well, server-client application via REST. In general, the idea is pretty simple, but I was disappointed when got next exception: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type text/plain was not found. wtf? I googled this problem and found there are problems with packing META-INF/services/*. Not sure, but it seems happens when you use Maven to assemble your Jersey application. Fortunately, the solution is very simple and fast. You have to add next plugin to your pom.xml ServicesResourceTransformer For now, all works:)

Немає коментарів:

Дописати коментар