Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF managed bean not created error

 
sardar waqas ahmed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
sardar waqas ahmed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic