You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Oliver Holzmann (JIRA)" <ji...@apache.org> on 2015/05/06 09:52:00 UTC

[jira] [Updated] (CAMEL-8746) Jasypt is not handling spring property injection with defaults anymore

     [ https://issues.apache.org/jira/browse/CAMEL-8746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Holzmann updated CAMEL-8746:
-----------------------------------
    Description: 
After updating from 2.15.1 to 2.15.2 injecting property values handled by Jasypt is not supporting default values any more.

Code like 
{code}
    @Value("${testProperty:test}")
    private String test;
{code}
is leading to {{NullPointerException}}:
{quote}
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)
{quote}

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

Code like 
{code}
    @Value("${testProperty:test}")
    private String test;
{code}
is leading to {{NullPointerException}}:
{quote}
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.testProperty; 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)
{quote}


> Jasypt is not handling spring property injection with defaults anymore
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-8746
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8746
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jasypt
>    Affects Versions: 2.15.2, 2.16.0
>            Reporter: Oliver Holzmann
>            Priority: Critical
>
> After updating from 2.15.1 to 2.15.2 injecting property values handled by Jasypt is not supporting default values any more.
> Code like 
> {code}
>     @Value("${testProperty:test}")
>     private String test;
> {code}
> is leading to {{NullPointerException}}:
> {quote}
> 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)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)