Upgrading from JSF 1.0.x to 1.1 at customer site

I wanted to share a small case resolution I had to resolve at customer site, I think the main conclusion from the issue was before starting to troubleshooting, read carefully your exception stack trace. </meta>


Case details at glance

- Customer had two myfaces web applications deployed under JBoss 4.0.5 with in a ear.

- The customer wanted to upgrade one of the web application from old myfaces 1.0.x version to 1.1.x

- The customer wanted to from JDK5 to JDK6.


Case exception

- The upgrade from myfaces 1.0.x to 1.1.x was successful under JDK5 </meta>

- Under JDK6 after using the login method, an error page with following exception was displayed:

ERROR [UIComponentTag] Faces context not found. 

Case resolution options

The above exception imply a JSF initialization error , several causes might be

- Duplication of JSF jars which result classloading issue

- JSF Misconfiguration


Most of the recommendation after googling about the issue is to find JSF duplication jars, or examine the web.xml <servlet-mapping> misconfiguration

My first step was to examine the jars duplication and found out I have 3 JSF's jars, 1 under jbossweb-tomcat.sar , and 2 under each war file.

removing the jsf-lib jars under jbossweb-tomcat.sar, a necessary step to eliminate jsf's issues, but the step didn't helped me to resolve the exception.


My second step was to examine the web.xml and try to figure out misconfiguration, the FacesServlet <servlet-mapping> configuration was OK, it was mapping *.jsf request correctly.


That's left me with no other options, I started to look back into the Exception details, and found out the request wasn't handled by the FacesServlet, which explain for sure, why FacesContext is not initialized.

I went back to the web.xml and examined it carefully, and found the issue, a unkown to me, 


servlet was configured to catch all request.

 <!-- definition for the default servlet -->

        <!-- Add a mapping for our new default servlet -->


Removing the above configuration, resolved the issue.


I think the main lesson I learned, as always, don't hurry to google around using the info you collected at first insight, take a deep breath and read the exception details carefully. 

Founder and CEO

Thank you for your interest!

We will contact you as soon as possible.

Want to Know More?

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com
Thank you for your interest!

We will contact you as soon as possible.

Let's talk

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com