2

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.

Community
  • 1
  • 1
BlairHippo
  • 9,502
  • 10
  • 54
  • 78
  • @BalusC: That does indeed appear very relevant. – BlairHippo Oct 03 '13 at 17:49
  • @BalusC: ... though a touch incomplete. I'm now trying to figure out how to let Eclipse know that I'd like it to use the new 2.1 library for JSF rather than the old 2.0. But what the heck, I seem to be pointed in the right direction. I'd still welcome guidance, but I'm feeling like I'm getting a handle on this. Thanks! – BlairHippo Oct 03 '13 at 17:59
  • Under Java Resources/Libraries, I'm seeing JSF 2.0. Under Project -> Properties -> Project Facets, I'm seeing 2.0 as the Version number for JavaServer Faces, and the new version isn't in the pull-down menu. I'm assuming this is going to cause trouble for me. – BlairHippo Oct 03 '13 at 18:15
  • Aiyee. I dropped `javax.faces-2.1.26.jar` into `/WEB-INF/lib` and made the changes to `sun-web.xml` as described, but setting `` gives me a null pointer when I log into the app; looks like an EJB isn't getting set. Any thoughts? – BlairHippo Oct 03 '13 at 19:11
  • Thanks, BalusC. Please see my latest edit; I'm getting hammered by `ClassNotFoundException`s when the server starts up, which suggests to me that my JARs aren't getting pulled-in properly. – BlairHippo Oct 03 '13 at 19:33
  • Wow. Which GF3 version exactly? – BalusC Oct 03 '13 at 19:56
  • This seems to be related: https://java.net/jira/browse/GLASSFISH-19017 – BalusC Oct 03 '13 at 20:01
  • GF 3.1.2. And yeah, that bug report does seem related -- and unfortunately, I don't see a workaround mentioned. – BlairHippo Oct 03 '13 at 20:07
  • Does indeed not look promising :/ Btw: I've cleaned up some comments. – BalusC Oct 03 '13 at 20:14

0 Answers0