my dog learned polymorphism
The moose likes JSF and the fly likes Base is null error in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Base is null error in JSF" Watch "Base is null error in JSF" New topic

Base is null error in JSF

sandip a patil

Joined: May 28, 2007
Posts: 1
Hi All,

I am facing some strange problem while working with JSF.
I have created one project which is running fine.If I create another project with another name(but same src/JSP's files) its giving me below error

I am getting error as,Base is null Error.

I am trying to login my application by entering username & password & then click on login button.

But its showing me error as,

javax.servlet.ServletException: Base is null: loginFormBean

where loginFormBean is name of my Bean in faces-config to accept username & password values from client side.

I am using JDK1.5,Tomcat 5.5,Exadel

Also I have jar files in my lib folder as,

If I remove jsf-api.jar,jsf-impl.jar these jar files its not showing Base is null error.

But It is creating another problem.
I have edit link ,If i remove above two jar files then I have to double clik that edit link then & then only edit page is opening.(It is not opening in one click)
Similar case happening for buttons.I need to double click buttons.

But if above( jsf-api.jar,jsf-impl.jar ) jar files there then its showing Base is null error.

Then I ,removed myfaces-api.jar,myfaces-impl.jar with myfaces-api-1.1.5.jar,myfaces-impl-1.1.5.jar.
I removed jsf-api.jar,jsf-impl.jar files.
Now Base is null error is not coming.Also I do not need to double click on edit link,buttons.

But to access menus I need to double click on menus.

Can anybody help me in this "Base is null" error.What need to do ?

Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Hi Sandip,

Welcome to the ranch! We've found that things stay a lot friendlier when people use their real first and last names as their display name so I'd ask you to update your display name to match our policy.



Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Tak Ng

Joined: Jun 05, 2007
Posts: 19
You should either use


The first group is the implementation of JSF provided by Sun and the second by Apache.

Read the tutorial at
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

Look at me, resurrecting an old thread. The search function works!

Indeed, I'm working with IBM's Rational Application Developer (IRAD 7), and hit this very error:

I found quite a few posts through google that were all over the map, although this one did seem to hit on the correct topic by the end:

Sun Developer Network: JavaServer Faces - javax.faces.el.PropertyNotFoundException: Base is null

Indeed, the two sets of jar file cannot be in the same project classpath:

After you have downloaded the necessary packages and setup your project hierarchy, do this:

* Make sure that there is no jsf-api.jar (i.e. Suns API implementation) in the classpath or in one of your container's shared lib directories (e.g. common/lib or shared/lib for Tomcat).
* Configure your webapp's web.xml file (see conf/web.xml for example and documentation)

The funny thing for me, is that I never actually combined all of these files on my own classpath in the first place. I'm using IRAD7, and it automatically puts these myfaces jar files in along with the jsf-api.jar files from Sun. As a result, when you deploy your app to WebSphere 6.1, you get the base is null exception. I deleted the myfaces.jar files, and the errors went away.

Funny. I always thought Rapid Application Development tools were supposed to stop you from making these obvious, yet difficult to diagnose mistakes. Leave it to Rational to make these mistakes for you!

-Cameron McKenzie
A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
I followed the instructions from myfaces wiki and it worked for me.
I did not have to delete those jars from shared libs.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

Ahhh...Very interesting link for installing MyFaces with WebSphere and getting rid of the old base is null error.

As I thought, it's classloader purgatory, with a requirement to move files away from one classloader location, and a request to change the PARENT_FIRST and PARENT_LAST configurations.

An excellent link. Thanks so much!

-Cameron McKenzie

Websphere 6.0 Installation Guide
1. Remove Webspheres JSF API and Implementation
Remove Jsf API and Jsf Impl from Webshpere AppServer/lib dir
AppServer/lib/jsf-api.jar - remove
AppServer/lib/ws-jsf.jar - remove

2. Copy the MyFaces JSF API to WAS
Copy the MyFaces API to AppServer/lib dir
myfaces-api.jar - copy to AppServer/lib
3. Add commons classes to WAS
Copy commons classes to AppServer/lib dir

For library versions see [WWW] Library dependencies
4. Remove MyFaces API from your web archive
myfaces-api.jar - remove from war
5. Deploy web application on WAS
Nothing speial here, just use Classloader option "Parent first"
I agree. Here's the link:
subject: Base is null error in JSF
It's not a secret anymore!