Rectangle 27 0

web services java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()LjavautilMap; when deploying jersey ws to Weblogic?


<wls:container-descriptor>
    <wls:prefer-application-packages>
        <!--  jersey-bundle-*.jar-->
        <wls:package-name>com.sun.jersey.*</wls:package-name>
        <wls:package-name>com.sun.research.ws.wadl.*</wls:package-name>
        <wls:package-name>com.sun.ws.rs.ext.*</wls:package-name>

        <!-- Jackson-*.jar -->
        <wls:package-name>org.codehaus.jackson.*</wls:package-name>

        <!-- jettison-*.jar -->
        <wls:package-name>org.codehaus.jettison.*</wls:package-name>

        <!-- jsr311*.jar -->
        <wls:package-name>javax.ws.rs.*</wls:package-name>

        <!-- asm.jar -->
        <wls:package-name>org.objectweb.asm.*</wls:package-name>
    </wls:prefer-application-packages>
</wls:container-descriptor>

I found this to work as a solution. Add it in your weblogic.xml:

Note
Rectangle 27 0

web services java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()LjavautilMap; when deploying jersey ws to Weblogic?


<wls:container-descriptor>
    <wls:prefer-application-packages>
        <!--  jersey-bundle-*.jar-->
        <wls:package-name>com.sun.jersey.*</wls:package-name>
        <wls:package-name>com.sun.research.ws.wadl.*</wls:package-name>
        <wls:package-name>com.sun.ws.rs.ext.*</wls:package-name>

        <!-- Jackson-*.jar -->
        <wls:package-name>org.codehaus.jackson.*</wls:package-name>

        <!-- jettison-*.jar -->
        <wls:package-name>org.codehaus.jettison.*</wls:package-name>

        <!-- jsr311*.jar -->
        <wls:package-name>javax.ws.rs.*</wls:package-name>

        <!-- asm.jar -->
        <wls:package-name>org.objectweb.asm.*</wls:package-name>
    </wls:prefer-application-packages>
</wls:container-descriptor>
<!-- jsr311*.jar -->
<wls:package-name>javax.ws.rs.*</wls:package-name>

I found this to work as a solution. Add it in your weblogic.xml:

Note