java – ClassNotFoundException:org. glassfish. jersey. internal. Runtimedelegateimpl was not found in the OSGi package with CXF dependencies embedded

This is related to jax-rs-2-0-change-default-implementation

When I try to deploy webapp, I get the following exception When I start the server, I set the system property to - djavax ws. rs.ext. RuntimeDelegate = org. apache. cxf. jaxrs. impl. Runtimedelegateimpl can solve this problem

But in the link above, it says that when I have meta inf / services / javax ws. rs.ext. Runtimedelegate file, whose content is org apache. cxf. jaxrs. impl. When runtimedelegateimpl, this can be solved

In my OSGi package, this file exists in cxf-rt-frontend-jaxrs-2.7 8. Jar, but the jar embedded in the OSGi package doesn't seem to get the right choice I tried to add the same file to the OSGi package meta - inf / services, but it didn't work either

Can someone tell me if there is a way to get rid of this without manually setting system properties?

Solution

The answer can be found here: https://wso2.org/jira/browse/WSAS-1870

Basically, you need to add a system property to set the default delegate:

javax. ws. rs.ext. RuntimeDelegate = org. apache. cxf. jaxrs. impl. RuntimeDelegateImpl

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>