Base is null Error
Hi All,
can anybody came across this situation.
i.e. gettingBase 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
javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
whereloginFormBean is name of my Bean in faces-config to accept username & password values from client side.
Thanks
Sandip
# 1
This error generally means that the given property cannot be found nor instantiated.
Make sure that the backing bean is instantiable using a no-arg constructor and that the managed-bean-name is definied and used correctly (case sensitive).
Or if "loginFormBean" is actually an property of another managed bean which you're trying to access by for example #{mainBean.loginFormBean.userName}, then make sure that this is preinstantiated during the initialization of the mainBean, e.g.: private LoginFormBean loginFormBean = new LoginFormBean();.
# 2
Thanks for your reply.
I have instanted my backing bean using no-arg constructor.
Also I checked that the managed-bean-name is definied and used correctly (case sensitive).
But still same error coming.
Is there other way.
I am using JDK1.5,Tomcat 5.5,Exadel.
Here is my entire stacktrace,
javax.servlet.ServletException: Base is null: loginFormBean
javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
root cause
javax.faces.el.PropertyNotFoundException: Base is null: loginFormBean
org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:455)
org.apache.myfaces.el.ValueBindingImpl.getType(ValueBindingImpl.java:169)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
javax.faces.component.UIInput.getConvertedValue(UIInput.java:713)
javax.faces.component.UIInput.validate(UIInput.java:638)
javax.faces.component.UIInput.executeValidate(UIInput.java:849)
javax.faces.component.UIInput.processValidators(UIInput.java:412)
javax.faces.component.UIForm.processValidators(UIForm.java:170)
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:240)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
Because same application is running on another machine.(same source,webcontent files)
But if I try to run I am getting Base is null error.
Thanks
Sandip
# 3
Hi All,Still I am not able to resolve this issue.Can anybody help me in this.So is it related with jar files ?I have jar files in my lib folder as,jsf-api.jar,jsf-impl.jar,myfaces-api.jar,myfaces-impl.jar,tomahawk.jarThanks,Sandip Patil
# 4
It may, or may not be the problem, but you have two different jsf implementations in your application.If you want to use the JSF RI, then get rid of myfaces-*.jar.If you want to use MyFaces, then get rid of jsf-*.jar
# 5
Hi ,
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 jar files there then its showing Base is null error.
So is there other way in this.
Thanks,
Sandip Patil
# 6
Hi All,
I have removed myfaces-api.jar,myfaces-impl.jar with myfaces-api-1.1.5.jar,myfaces-impl-1.1.5.jar.
And also placed tomahawk-1.1.5.jar in my webcontent/lib folder(I have not removed old tomahawk.jar).So both tomahawk version there.
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.
If I remove old tomahawk.jar and keep tomahawk-1.1.5.jar then I am getting error as,
javax.faces.FacesException: java.lang.NoClassDefFoundError: org/apache/myfaces/custom/buffer/HtmlBufferResponseWriterWrapper
So what version of tomahawk I should place along with myfaces-api-1.1.5.jar,myfaces-impl-1.1.5.jar ?
Thanks
Sandip
# 7
can anybody suggest in above.I am still not able to solve this problemThankssandip
# 8
anyone from JSF ,can help me in this error?Thankssandip
# 9
I'd suggest going straight to the source to find out the cause of the missing class. Post to the MyFaces list. I don't believe too many MyFaces developers lurk here.
# 10
Hi All,the problem was with Eclipse cache which refering previous plugins.So if anybody get this error try to open eclipse in clean mode.ThnaksSandip
# 11
Hi Guys,I think I was in hurry for my above post.the problem stll there.When I created new project its again giving Base is null error.Can anybody help me in this.ThanksSandip
# 12
if click on a edit link and you wait long enough to edit, in this period your session could expire, and it will . than it's clear that you get such a execption.