myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arvid Hülsebus <arvid.huelse...@atanion.com>
Subject Re: [TOBAGO] addressbook demo crashes on phone number validation
Date Tue, 17 Apr 2007 06:07:09 GMT
Hello Mike,

We are currently in the process to overhaul the address book demo. We 
merged it with an older variant based on Faclets and added a DB back-end 
instead of the former file based implementation. I still have a list of 
about 20 issues we still have to fix.

But I didn't notice the missing resource up to now. This should be fixed 
now. Although the validator is very simplistic and the error message is 
pretty cryptic. You have to enter something like "+111 111 1111".

Thanks and best regards,
Arvid

Mike Kienenberger wrote:
> Just going through the Tobago addressbook demo.
>
> Grabbed it from svn, and then ran this command:
>
> C:\workspaces\myfaces\addressbook-1.0.10>mvn jetty:run-exploded
>
> I created a new address, and put in a phone number in this format
> 111-111-1111 and I got the following error (which is probably
> unrelated to the actual data input).
>
> Looks like the root cause is:
>
> java.util.MissingResourceException: Can't find resource for bundle
> java.util.PropertyResourceBundle, key validator_phone
>
> =========================
>
> HTTP ERROR: 500
>
> Exception while invoking expression #{controller.validatePhoneNumber}
>
> RequestURI=/tobago-example-addressbook/faces/editor.jsp
> Caused by:
>
> javax.faces.el.EvaluationException: Exception while invoking
> expression #{controller.validatePhoneNumber}
>     at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156) 
>
>     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)
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> org.apache.myfaces.tobago.component.UITabGroup.processValidators(UITabGroup.java:172)

>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> org.apache.myfaces.tobago.component.UIForm.processValidators(UIForm.java:71) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:149)
>     at 
> org.apache.myfaces.tobago.component.UIViewRoot.processValidators(UIViewRoot.java:175)

>
>     at 
> org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)

>
>     at 
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95) 
>
>     at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
>     at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>     at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)

>
>     at 
> org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter.doFilter(TobagoMultipartFormdataFilter.java:130)

>
>     at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)

>
>     at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>     at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) 
>
>     at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>     at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>     at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>     at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)

>
>     at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) 
>
>     at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>     at org.mortbay.jetty.Server.handle(Server.java:285)
>     at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>     at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765) 
>
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>     at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) 
>
>     at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) 
>
> Caused by: java.util.MissingResourceException: Can't find resource for
> bundle java.util.PropertyResourceBundle, key validator_phone
>     at java.util.ResourceBundle.getObject(ResourceBundle.java:325)
>     at java.util.ResourceBundle.getString(ResourceBundle.java:285)
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.MessageUtils.getLocalizedString(MessageUtils.java:34)

>
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.MessageUtils.createErrorMessage(MessageUtils.java:53)

>
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.Controller.validatePhoneNumber(Controller.java:195)

>
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132) 
>
>     ... 40 more
>
> Caused by:
>
> java.util.MissingResourceException: Can't find resource for bundle
> java.util.PropertyResourceBundle, key validator_phone
>     at java.util.ResourceBundle.getObject(ResourceBundle.java:325)
>     at java.util.ResourceBundle.getString(ResourceBundle.java:285)
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.MessageUtils.getLocalizedString(MessageUtils.java:34)

>
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.MessageUtils.createErrorMessage(MessageUtils.java:53)

>
>     at 
> org.apache.myfaces.tobago.example.addressbook.web.Controller.validatePhoneNumber(Controller.java:195)

>
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132) 
>
>     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)
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> org.apache.myfaces.tobago.component.UITabGroup.processValidators(UITabGroup.java:172)

>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> org.apache.myfaces.tobago.component.UIForm.processValidators(UIForm.java:71) 
>
>     at 
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) 
>
>     at 
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:149)
>     at 
> org.apache.myfaces.tobago.component.UIViewRoot.processValidators(UIViewRoot.java:175)

>
>     at 
> org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)

>
>     at 
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95) 
>
>     at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
>     at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>     at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)

>
>     at 
> org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter.doFilter(TobagoMultipartFormdataFilter.java:130)

>
>     at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)

>
>     at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>     at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) 
>
>     at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>     at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>     at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>     at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)

>
>     at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) 
>
>     at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>     at org.mortbay.jetty.Server.handle(Server.java:285)
>     at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>     at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765) 
>
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>     at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) 
>
>     at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) 
>
>
> Powered by Jetty://
>

Mime
View raw message