Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8746

Jasypt with BridgePropertyPlaceholderConfigurer is not handling spring property injection with defaults anymore

    XMLWordPrintableJSON

Details

    • Novice

    Description

      After updating from 2.15.1 to 2.15.2 injecting property values handled by Jasypt via BridgePropertyPlaceholderConfigurer is not supporting default values any more.

      Code like

          @Value("${testProperty:test}")
          private String test;
      

      is leading to NullPointerException:

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String org.apache.camel.component.jasypt.Test.test; nested exception is java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
      at java.util.regex.Matcher.reset(Matcher.java:308)
      at java.util.regex.Matcher.<init>(Matcher.java:228)
      at java.util.regex.Pattern.matcher(Pattern.java:1088)
      at org.apache.camel.component.jasypt.JasyptPropertiesParser.parseProperty(JasyptPropertiesParser.java:56)
      at org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer.resolvePlaceholder(BridgePropertyPlaceholderConfigurer.java:121)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)

      Attachments

        1. diff_CAMEL-8746.txt
          10 kB
          Oliver Holzmann

        Activity

          People

            davsclaus Claus Ibsen
            OHolzma Oliver Holzmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: