Thursday, March 22, 2012

SEVERE: Error listenerStart Part IV

By now you've gone through the other possible solutions on this site to get your JSF Portlet to deploy and are still seeing this evil,  horrible, unholy error message and you're seriously contemplating changing careers...

It hit me this afternoon that there is yet another possible cause for this error that might catch the new developer off guard.

Which version of JSF are you using?

No, I don't mean the version number.  I mean which implementation?  Don't know?  Better find out, because there are two very popular ones.

The first is Mojarra, which is the JSF implementation developed by Sun.  It's the one I've used most often in my own JSF Portlets in Liferay.  The other is MyFaces from Apache.  They both comply with the JSF standard, and are usually interchangeable...


You have to make sure you know which one you're dealing with when you're editing your web.xml.  When you configure your listener, you need to know which implementation you're working with so that you can configure it to call the correct class.

If you're using Mojarra, then your listener should look like this:


If you're using Apache MyFaces, then it should look like this:

<listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>

Make sure you're configuring for the right implementation!

1 comment:

  1. Online web Solutions Company which is aimed at to give wings to your business by maximizing your online presence in the most effective way. Excellent work..I really appriciate to you for this great effort..Web Development