Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
valang error on Uppercase propertie Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • valang error on Uppercase propertie

    hello,

    I have some annoying error, and i need some help.

    I'm using spring-modules 0.6 (because is the newest version on maven repository)

    i have a client Bean like this:

    Code:
    ....................
    private String PAN;
    
    public String getPAN(){
       return PAN;
    }
    public void setPAN(String PAN){
      this.PAN=PAN
    }
    .................................
    And i need to validate that propertie, to check the name os de propertie e use commons-beans utils and said that properties name is "PAN".


    then i use the valang like this:

    Code:
    <bean id="registerCCRequest.validator" class="org.springmodules.validation.valang.ValangValidator">
              <property name="valang"><value><![CDATA[
              { idNumber : length(?) = 8: 'lol' : 'lol' : 10}
              { Pan : length(?) = 8: 'lol' : 'lol' : 10}
              ]]></value></property>
          </bean>

    And give this error:

    Code:
    Invocation of init method failed; nested exception is org.springmodules.validation.valang.parser.TokenMgrError: Lexical error at line 3, column 13.  Encountered: "P" (80), after : ""
    Caused by: org.springmodules.validation.valang.parser.TokenMgrError: Lexical error at line 3, column 13.  Encountered: "P" (80), after : ""
            at org.springmodules.validation.valang.parser.ValangParserTokenManager.getNextToken(ValangParserTokenManager.java:2657)
            at org.springmodules.validation.valang.parser.ValangParser.jj_ntk(ValangParser.java:1736)
            at org.springmodules.validation.valang.parser.ValangParser.parseValidation(ValangParser.java:187)
            at org.springmodules.validation.valang.ValangValidator.afterPropertiesSet(ValangValidator.java:163)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
            at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:89)
            at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:74)
            at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:65)
            at com.multicert.project.cc.maestro.test.MapperTest.setUpProjectDao(MapperTest.java:43)
    I try put the key "pAN" but said that don't exist.

    I can't put uppercase properties ??

    What i can do to resolve the problem ? (changing the bean is not a option)


    Thanks in advance

  • #2
    any solution?

    i am facing the same capital latter problem.

    Has anyone got any solution to validate fields which are in capital latters.

    Regards,
    Dhaval

    Comment

    Working...
    X