It's not a secret anymore!*
The moose likes JSF and the fly likes JSF managed bean not created error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF managed bean not created error" Watch "JSF managed bean not created error" New topic
Author

JSF managed bean not created error

sardar waqas ahmed
Greenhorn

Joined: Oct 19, 2011
Posts: 16
i am using jsf 2.0 and i have created a page education.xhtml .i bind it with managed bean education.java and add all the required property .i have one method saveEducation() in managed bean when i press the save button i got the following exception.

javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /education.xhtml @18,80 action="#{education.saveUser}": Method not found: com.hrms.beans.PersonalInfoBean@1d232d1.saveUser()
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
javax.faces.component.UICommand.broadcast(UICommand.java:311)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)


i have already created this method and also added managed bean in my faces-config.xml. kindly help me and show where i am doing the mistake .is there a problems with my project.thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

The saveUser() method must be a member (not static) method declared public, accept no arguments, and return either a String or void (In JSF1, only String was allowed).


Customer surveys are for companies who didn't pay proper attention to begin with.
sardar waqas ahmed
Greenhorn

Joined: Oct 19, 2011
Posts: 16
Thanks for your reply.my managed bean method is already public and return type is also String and there is no argument
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

If all of the above is true, then I suggest showing the code to a co-worker. When I do all the right things and it still doesn't work, it means I did something simple and stupid and I can't see it because I'm reading what I expect to be there and not what actually is there. An independent eye won't make those assumptions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF managed bean not created error