It worked when I added export="true":
<module name="javax.ws.rs.api" export="true"/>
I don't understand why though?
without full stacktrace it is hard to say what is going on.
but from what you say I would guess that export=true helped because dependency you are missing is in a module that depends on your org.jose4j module and not the other way around.
export=true just exports module dependency also to its caller.