?
Solved

JSF example errors

Posted on 2010-09-19
2
Medium Priority
?
792 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

770 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