Using GlassFish <class-loader delegate=“false” /> in WAR of EAR causes ClassNotFoundExceptions on JARs in WAR

雨燕双飞 提交于 2019-12-10 22:56:10

问题


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 ClassNotFoundExceptions. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!