You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/05/06 10:32:00 UTC
[jira] [Commented] (CAMEL-8746) Jasypt with
BridgePropertyPlaceholderConfigurer is not handling spring property
injection with defaults anymore
[ https://issues.apache.org/jira/browse/CAMEL-8746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14530144#comment-14530144 ]
Claus Ibsen commented on CAMEL-8746:
------------------------------------
Are you saying that the default value is "test", eg @Value is a spring property placeholder, not a Camel one.
> Jasypt with BridgePropertyPlaceholderConfigurer 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, camel-spring
> Affects Versions: 2.15.2
> Reporter: Oliver Holzmann
> Fix For: 2.16.0, 2.15.3
>
>
> 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
> {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)