Results 1 to 5 of 5

Thread: Problems when setting an integer value by PropertyPlaceHolderConfigurer

  1. #1
    Join Date
    May 2012
    Posts
    4

    Default Problems when setting an integer value by PropertyPlaceHolderConfigurer

    Hey,

    I'm running into a problem that I believe to be the exact same as the one found here:
    http://forum.springsource.org/showth...lderConfigurer

    However, the attribute I'm having trouble with is tx:annotation-driven's order. It is defined in the schema as an xsd:int. I guess this causes the SAX parser to choke before PropertyPlaceholderConfigurer has a chance to replace the property placeholder.

    Code:
    Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${AopConfiguration.transaction}' is not a valid value for 'integer'.
    Should "order" be a string instead? Is there anyway to work around this limitation?

    --
    Thanks,
    Ryan

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Read the other post, such bug is not related with Spring.
    Last edited by dr_pompeii; May 4th, 2012 at 07:46 PM.
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    May 2012
    Posts
    4

    Default

    It is related to Spring. It's the tx schema that I'm having trouble with:

    http://www.springframework.org/schem...ing-tx-3.0.xsd

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Although it is related to spring it isn't going to be fixed. The problem is do you want xsd validation or do you want support for property placeholder. In the latter case each and every property would have to be a string, which basically reduced or disables the reason why there are xsd in the first place. So in short the xsd isn't going to be changed.

    There is a workaround this, however, requires some work on your side. You would have to disable schema validation this can be done by implementing your own ApplicationContext (extending the current ones) and use those in your application. That way there is no more schema validation and that should enable the property place holder stuff.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    May 2012
    Posts
    4

    Default

    Thanks, Marten. You've pretty much confirmed what I expected.

    In my case, it's not worth disabling schema validation for, but it would have been nice to have.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •