myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard W. Smith, Jr." <smithh032...@gmail.com>
Subject TomEE/MyFaces: 75040 is not a valid value for property totalMilesInOther
Date Mon, 17 Dec 2012 16:18:54 GMT
This is very very strange. The value, 75,040 is a valid Integer value. The
entity class and class worked fine on Mojarra 2.1.3/4/7 last year, when
this was all used by myself and endusers of the web app.

Now, I have TomEE 1.5.1, which has MyFaces 2.1.10. It seems as though the
error is raised by bval jsr303. I am thinking that I can prevent this
exception by removing the f:convertNumber from the xhtml. Please see all
below and confirm/advise.

RollingStock.java (entity class)

    @Basic(optional = false)
    @NotNull
    @Column(name = "TOTAL_MILES_IN_OTHER_STATES")
    private Integer totalMilesInOtherStates;



xhtml (please note the f:convertNumber) below:

    <p:inputText id="totalMilesInOtherStates" size="10"
                 styleClass="number_alignright"
                 disabled="#{pf_rollingStockController.view}"

 value="#{pf_rollingStockController.selected.totalMilesInOtherStates}">
        <f:convertNumber groupingUsed="false" integerOnly="true"
type="number"/>
    </p:inputText>


Exception stacktrace below:

Caused by: java.lang.IllegalArgumentException: 75040 is not a valid
value for property totalMilesInOtherStates of type class
jpa.entities.RollingStock
	at org.apache.bval.jsr303.ClassValidator.unrecoverableValidationError(ClassValidator.java:511)
	at org.apache.bval.jsr303.ClassValidator.validateValueImpl(ClassValidator.java:813)
	at org.apache.bval.jsr303.ClassValidator.validateValue(ClassValidator.java:239)
	at org.apache.bval.jsr303.ClassValidator.validateValue(ClassValidator.java:231)
	at javax.faces.validator.BeanValidator.validate(BeanValidator.java:196)
	at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:272)
	at javax.faces.component.UIInput.validateValue(UIInput.java:466)
	at javax.faces.component.UIInput.validate(UIInput.java:611)
	at javax.faces.component.UIInput.processValidators(UIInput.java:274)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at org.primefaces.component.api.UIData.process(UIData.java:314)
	at org.primefaces.component.api.UIData.processChildren(UIData.java:299)
	at org.primefaces.component.api.UIData.processPhase(UIData.java:263)
	at org.primefaces.component.api.UIData.processValidators(UIData.java:243)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at org.primefaces.component.panel.Panel.processValidators(Panel.java:297)
	at javax.faces.component.UIForm.processValidators(UIForm.java:209)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at org.primefaces.extensions.component.layout.Layout.processValidators(Layout.java:193)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1429)
	at javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1416)
	at javax.faces.component.UIViewRoot.access$500(UIViewRoot.java:74)
	at javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1523)
	at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1372)
	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:799)
	at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
	... 27 more
Caused by: org.apache.bval.jsr303.IncompatiblePropertyValueException:
75040 is not a valid value for property totalMilesInOtherStates of
type class jpa.entities.RollingStock
	at org.apache.bval.jsr303.ClassValidator.validateValueImpl(ClassValidator.java:735)
	... 57 more

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message