[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

JSF example errors

Posted on 2010-09-19
2
Medium Priority
?
799 Views
Last Modified: 2013-11-24

hi,
I am trying to run chapter 4 related example from link

http://jsfcompref.com/code_download.html

I got this kind of error

<Sep 19, 2010 3:29:14 PM EDT> <Error> <HTTP> <BEA-101017> <[ServletContext@21864173[app:_auto_generated_ear_ module:CR_CH04 path:/CR_CH04 spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@83ba01[
POST /CR_CH04/faces/register.jsp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost:7001/CR_CH04/faces/register.jsp
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Content-Length: 334
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=wsGGMWjPHQ7NJKJVrz12hNMmdQxx6v6pxfm1cWhvqPywcD6j1hSz!-1918873751

]] Root cause of ServletException.
javax.faces.el.EvaluationException: Exception while invoking expression #{userBean.validateEmail}
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:168)
      at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:181)
      at javax.faces.component.UIInput.validateValue(UIInput.java:313)
      at javax.faces.component.UIInput.validate(UIInput.java:354)
      at javax.faces.component.UIInput.processValidators(UIInput.java:184)
      Truncated. see log file for complete stacktrace

Caused By: java.lang.NoSuchMethodException: com.jsfcompref.register.UserBean.validateEmail(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
      at java.lang.Class.getMethod(Class.java:1605)
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:121)
      at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:181)
      at javax.faces.component.UIInput.validateValue(UIInput.java:313)
      at javax.faces.component.UIInput.validate(UIInput.java:354)
      Truncated. see log file for complete stacktrace

 after click in register button whch appeared after clicking first link as in screenshot.

(Chapter 4 Examples
Non functional Register.jsp to show managed properties, Pages 55-56

Sports_Interests.jsp page showing further managed bean and property examples, Pages 57-74

--------------------------------------------------------------------------------


when i click link (at url http://localhost:7001/CR_CH04/)

Non functional Register.jsp to show managed properties, Pages 55-56)

Please advise how can i fix it. Any links ideas sample code, resources etc highly appreciated. Thanks in advance



jsf-ch4.JPG
0
Comment
Question by:gudii9
2 Comments
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 1000 total points
ID: 33714210
Can you post your JSP ?
0
 
LVL 6

Assisted Solution

by:__geof__
__geof__ earned 1000 total points
ID: 33714269
Exactly as the error says. The method validateEmail doesn't exist. You need to create it. To do so, you need a class that implements Validator and register it in your faces-config.

See http://blogs.sun.com/johnc/entry/validating_an_email_address_in and/or http://www.roseindia.net/jsf/validator.shtml for examples.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question