OpenIotOrg / openiot

The Open Source Project for the Internet of Things
459 stars 189 forks source link

Request Definition Error - with incorrect value for meter gauge component #59

Open premjayaraman opened 10 years ago

premjayaraman commented 10 years ago

When a incorrect value is entered for meter gauge range, the following error it thrown

Steps to replicate,

  1. Provide a value 000 to meter gauge range
  2. Then delete a meter gauge (in my case the component did not get deleted)
  3. Hence, I had to refresh to the page to clear the component.
  4. The error was thrown.
  5. Signing again does not help. The same page is displayed.

error-reqdef1

Full Error Text Below type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error converting [1,000] to a double value; javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)

root cause

java.lang.IllegalArgumentException: Error converting [1,000] to a double value; org.primefaces.extensions.component.inputnumber.InputNumberRenderer.formatForPlugin(InputNumberRenderer.java:247) org.primefaces.extensions.component.inputnumber.InputNumberRenderer.encodeScript(InputNumberRenderer.java:174) org.primefaces.extensions.component.inputnumber.InputNumberRenderer.encodeEnd(InputNumberRenderer.java:91) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeBody(DynaFormRenderer.java:267) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeMarkup(DynaFormRenderer.java:111) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeEnd(DynaFormRenderer.java:78) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312) com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) com.sun.faces.renderkit.html_basic.CompositeRenderer.encodeChildren(CompositeRenderer.java:78) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) javax.faces.render.Renderer.encodeChildren(Renderer.java:168) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59) org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) org.primefaces.extensions.component.layout.LayoutPaneRenderer.encodeBegin(LayoutPaneRenderer.java:152) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:56) org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) org.primefaces.extensions.component.layout.LayoutPaneRenderer.encodeBegin(LayoutPaneRenderer.java:152) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402) com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)

root cause

java.lang.NumberFormatException: For input string: "1,000" sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241) java.lang.Double.parseDouble(Double.java:540) org.primefaces.extensions.component.inputnumber.InputNumberRenderer.formatForPlugin(InputNumberRenderer.java:234) org.primefaces.extensions.component.inputnumber.InputNumberRenderer.encodeScript(InputNumberRenderer.java:174) org.primefaces.extensions.component.inputnumber.InputNumberRenderer.encodeEnd(InputNumberRenderer.java:91) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeBody(DynaFormRenderer.java:267) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeMarkup(DynaFormRenderer.java:111) org.primefaces.extensions.component.dynaform.DynaFormRenderer.encodeEnd(DynaFormRenderer.java:78) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312) com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) com.sun.faces.renderkit.html_basic.CompositeRenderer.encodeChildren(CompositeRenderer.java:78) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) javax.faces.render.Renderer.encodeChildren(Renderer.java:168) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59) org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) org.primefaces.extensions.component.layout.LayoutPaneRenderer.encodeBegin(LayoutPaneRenderer.java:152) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:56) org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) org.primefaces.extensions.component.layout.LayoutPaneRenderer.encodeBegin(LayoutPaneRenderer.java:152) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402) com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206) net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)

note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.

rhzg commented 10 years ago

It happend to me too - how do I fix the system after this happens?

btw, I set the value to 1000 and the interface changed this to "1,000.00000" but the server can not handle the ',' format.