Jersey exception only thrown when depencencies assembled into a single jar

旧街凉风 提交于 2019-11-27 19:21:19
Pavel Bucek

You are not merging Jersey jars correctly.

Jersey 1.x uses META-INF/services mechanism to discover its components and assembly:single probably just copies everything into single jar, overriding already present files BUT META-INF/services file(s) needs to be CONCATENATED.

Try using jersey-bundle (com.sun.jersey:jersey-bundle:1.14) or fix your assembly settings (or find another plugin to do it better).

Could you post your pom ?

Do you mark some dependencies as provided ? It's something quite different to build a standalone app and a webapp, as some jars a supposed to be provided by the web container (tomcat or other).

As your container is "embedded" in your app (and not your app in the container) then maybe you don't manage correctly these dependencies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!