java.lang.IllegalArgumentException: Unable to parse property path ö

Hibernate JIRA | Gunnar Morling | 6 years ago
  1. 0

    Use CE BeanValidator in a form binding will show the following error: SEVERE: >>java.lang.IllegalArgumentException: Invalid property path. There is no property lastName in entity org.zkoss.bind.SimpleForm >> at org.hibernate.validator.engine.ValidatorImpl.collectMetaConstraintsForPath(ValidatorImpl.java:684) >> at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:578) >> at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:146) >> at org.zkoss.bind.validator.BeanValidator.validate(BeanValidator.java:67) >> at org.zkoss.bind.validator.BeanValidator.validate(BeanValidator.java:138) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.validate(SavePropertyBindingImpl.java:233) >> at org.zkoss.bind.impl.PropertyBindingHandler.doValidateSaveEvent(PropertyBindingHandler.java:233) {code:xml} <zk> <zscript><![CDATA[ import org.zkoss.bind.validator.BeanValidator; //import org.zkoss.zkmax.bind.BeanValidator; public class MyVM { private User user; public MyVM () { user = new User(); } public User getUser() { return user; } public BeanValidator getBeanValidator(){ return new BeanValidator(); } } ]]></zscript> <window id="win" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('MyVM')" validationMessages="@id('vmsgs')"> <textbox id="tb" value="@bind(vm.user.lastName) @validator(vm.beanValidator)" /> <label value="@load(vmsgs[tb])" /> <div form="@id('fx') @load(vm.user)"> <textbox id="tb2" value="@bind(fx.lastName) @validator(vm.beanValidator)" /> <label value="@load(vmsgs[tb2])" /> </div> </window> </zk> {code} {code:java} public static class User{ private String _lastName = "Chen"; @NotEmpty(message = "Last name can not be null") public String getLastName() { return _lastName; } public void setLastName(String name) { _lastName = name; } } {code}

    ZK-Tracker | 4 years ago | jimmyshiau
    java.lang.IllegalArgumentException: Invalid property path. There is no property lastName in entity org.zkoss.bind.SimpleForm
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Use CE BeanValidator in a form binding will show the following error: SEVERE: >>java.lang.IllegalArgumentException: Invalid property path. There is no property lastName in entity org.zkoss.bind.SimpleForm >> at org.hibernate.validator.engine.ValidatorImpl.collectMetaConstraintsForPath(ValidatorImpl.java:684) >> at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:578) >> at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:146) >> at org.zkoss.bind.validator.BeanValidator.validate(BeanValidator.java:67) >> at org.zkoss.bind.validator.BeanValidator.validate(BeanValidator.java:138) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.validate(SavePropertyBindingImpl.java:233) >> at org.zkoss.bind.impl.PropertyBindingHandler.doValidateSaveEvent(PropertyBindingHandler.java:233) {code:xml} <zk> <zscript><![CDATA[ import org.zkoss.bind.validator.BeanValidator; //import org.zkoss.zkmax.bind.BeanValidator; public class MyVM { private User user; public MyVM () { user = new User(); } public User getUser() { return user; } public BeanValidator getBeanValidator(){ return new BeanValidator(); } } ]]></zscript> <window id="win" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('MyVM')" validationMessages="@id('vmsgs')"> <textbox id="tb" value="@bind(vm.user.lastName) @validator(vm.beanValidator)" /> <label value="@load(vmsgs[tb])" /> <div form="@id('fx') @load(vm.user)"> <textbox id="tb2" value="@bind(fx.lastName) @validator(vm.beanValidator)" /> <label value="@load(vmsgs[tb2])" /> </div> </window> </zk> {code} {code:java} public static class User{ private String _lastName = "Chen"; @NotEmpty(message = "Last name can not be null") public String getLastName() { return _lastName; } public void setLastName(String name) { _lastName = name; } } {code}

    ZK-Tracker | 4 years ago | jimmyshiau
    java.lang.IllegalArgumentException: Invalid property path. There is no property lastName in entity org.zkoss.bind.SimpleForm

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Unable to parse property path ö

      at org.hibernate.validator.engine.PathImpl.parseProperty()
    2. Vaadin
      ValidatorImpl.validateValue
      1. org.hibernate.validator.engine.PathImpl.parseProperty(PathImpl.java:216)
      2. org.hibernate.validator.engine.PathImpl.createPathFromString(PathImpl.java:64)
      3. org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:152)
      3 frames