问题
The problem: I'm doing maintenance/enhancement work on a project using an old (2.0.3) version of Mojarra, and recently hit a bug. Updating Mojarra corrects the problem. Unfortunately, updating Mojarra on the production Glassfish server isn't an option; a whole bunch of applications in production are on that server, and there is no possible way our QA department would be able to check all of them for regression errors.
The proposed solution: Deploy Mojarra with just this application, I've dropped the new Mojarra jar (javax.faces-2.1.26.jar
) into /WEB-INF/lib
, and changed the sun-web.xml
per BalusC's answer in another question.
The complication: Doesn't work. Setting <class-loader delegate="false" />
results in a null-pointer exception when I log into the app; apparently, my EJBs are no longer being set properly. Leaving "delegate" set to "true" gets me into the app, but is using the old Mojarra on the server, leaving me back where I started.
So, how do I accomplish what I want here? Is there some other way of doing this (other than updating the JAR on the Glassfish server itself, which is a non-starter) or of correcting the behavior I'm seeing?
EDIT: Taking a closer look at the console output, I'm getting a TON of ClassNotFoundException
s. It looks like my other JAR files aren't getting pulled-in.
来源:https://stackoverflow.com/questions/19165451/using-glassfish-class-loader-delegate-false-in-war-of-ear-causes-classnotf