0 Replies Latest reply on Mar 31, 2015 11:19 AM by Paul Newport

    Changing class loader policy to allow loading of old JSF jars

    Paul Newport Newbie

      We are migrating a JEE6 to Spring. The idea is that it is a Spring boot app, so it can run via an embedded undertow or tomcat server, or can be deployed as a WAR. It's using an old version of JSF but that is fine, we jsut add these to our POM and bundle them with our app. The app runs fine on embedded undertow or as a WAR on Tomcat.


      When we try and run on WildFly 8 the deployment fails


      One of our classes extends javax.faces.view.facelets;ResourceResolver


      and at deploy time the constructor throws this exception

      com.sun.faces.facelets.impl.DefaultResourceResolver: method <init>()V not found


      This is because in later versions of the class there is no default constructor and you have to use this instead:


      DefaultResourceResolver(ResourceHandler resourceHandler)


      So my question is, how do I isolate my app from the WildFly bundled JSF jars ?


      In something like Tomcat this isn't an issue as the Jars aren't bundled with Tomcat, and it's not an issue in something like Websphere as you can set the classlaoder to be PARENT_LAST.


      I'm hoping that you can do this in WildFly however the docs imply otherwise (see below).