Identity ‘signupBean’ does not reference a MethodExpression instance

Problem itself is simple. JSF h:commandButton or h:commadLink is pressed and error below happens.

javax.el.ELException: /index.xhtml @12,78 action="#{signupBean}": Identity 'signupBean' does not reference a MethodExpression instance, returned type: com.project.beans.SignupBean

If you see something similar then you have typo in your code. In your commandButton/commandLink is missing bean method specification.

<h:commandButton value="Login with gmail" action="#{signupBean}"></h:commandButton>

must be replaced with

<h:commandButton value="Login with gmail" action="#{signupBean.signup}"></h:commandButton>

Full stack trace to follow 

javax.faces.el.EvaluationException: javax.el.ELException: /index.xhtml @12,78 action="#{signupBean}": Identity 'signupBean' does not reference a MethodExpression instance, returned type: com.project.beans.SignupBean
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:679)
Caused by: javax.el.ELException: /index.xhtml @12,78 action="#{signupBean}": Identity 'signupBean' does not reference a MethodExpression instance, returned type: com.project.beans.SignupBean
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:104)
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
	... 20 more

1 thought on “Identity ‘signupBean’ does not reference a MethodExpression instance

Leave a Reply

Your email address will not be published.


*