javaweb-servicesmavenjerseyjsr311

Replace jersey-bundle-1.12 with Jsr311-api-1.1.1


I am trying to replace Jersey-bundle with jsr311-api but after replacing it on pom.xml I am getting java.lang.CLassNotFoundException com.sun.ws.rs.ext.runtimedelegateimpl

When I debug a little I found that in jsr311-api.javax.ws.rs.ext.RunTimeDelegate.findDelegate() it looks for javax.ws.rs.ext.RunTimeDelegate first then looks for com.sun.ws.rs.ext.runtimedelegateimpl. Why it is not able to fund the javax.ws.rs.ext.RunTimeDelegate in the first place? and obviously i don't have runtimedelegateimpl it is crying about it. Is it possible to completely replace jersey-bundle with jsr311-api or I have to keep jesey-bundle along with jsr?


Solution

  • Alone jsr311-api won't work it needs to have an implementation, so if want to replace jesrey-bundle, add jsr311 and change the jersey-bundle scope to test because test might use the implementation.