Weblogic 12.1.2 & Jersey 2.7

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weblogic 12.1.2 & Jersey 2.7

trolly
Hi All - Anyone have an elegant way to get a Jersey 2.7 app working on weblogic 12.1.2? Below is what I added to my weblogic.xml but dang does this approach seem brittle. Although the list seems short, it was a painful process that took hours of inspecting TONs of different exceptions to come up with that list.

And it's odd they call it "prefer-application-packages", i didn't find that very accurate. It's more like "only-look-in-application-for-packages", because if you put java.* in one of those your app will fail with class not found exception for java.lang.Object.

<wls:container-descriptor>
<!-- <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> -->
<wls:prefer-application-packages>
<wls:package-name>org.glassfish.*</wls:package-name>
<wls:package-name>javax.ws.rs.*</wls:package-name>
<!-- <wls:package-name>org.codehaus.jackson.*</wls:package-name> -->
<wls:package-name>org.eclipse.persistence.*</wls:package-name>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>ch.qos.logback.*</wls:package-name>
<wls:package-name>org.apache.log4j.*</wls:package-name>
<wls:package-name>javax.validation.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
<!-- <wls:package-name>org.jvnet.*</wls:package-name> -->
<wls:package-name>org.hibernate.validator.*</wls:package-name>
<wls:package-name>com.sun.jersey.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weblogic 12.1.2 & Jersey 2.7

marcioferlan
This post has NOT been accepted by the mailing list yet.
Which dependencies did you declare in your project pom.xml in order to get it working? I tried the same config in weblogic.xml and it didn't work for me.

Thanks in advance!
Loading...