Hi
I'm wondering where the second bundle with id 4420, providing
org.jasypt.encryption.pbe.config,comes from. Have you
installed it with one of your features? When I install the jasypt-encryption
and camel-jasypt I have only one bundle
which provides this package
karaf@root> features:install jasypt-encryption
karaf@root> features:install camel-jasypt
karaf@root> exports | grep org.jasypt.encryption.pbe.config
47 org.jasypt.encryption.pbe.config; version=1.9.0
karaf@root>
Could you check where does the bundle with id 4420 come from?
regards
Krzysztof
On 24.04.2015 17:09, harald wrote:
> Hello,
>
> within SMX 4.5.3, with jasypt-encryption and camel-jasypt loaded, a I try to
> enable the usage of encrypted parameters for beans and camel routes within
> the same blueprint. If I copy the blueprint into the deploy folder it works.
> If I put the blueprint into a bundle and load it from the maven repository I
> see exceptions:
>
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
> load class org.jasypt.encryption.pbe.StandardPBEStringEncryptor from recipe
> BeanRecipe[name='#recipe-84']
> <stacktrace removed>
> Caused by: java.lang.ClassNotFoundException:
> org.jasypt.encryption.pbe.StandardPBEStringEncryptor not found by encconfig
> [4418]
> <stacktrace removed>
>
> So I added
>
> org.jasypt.encryption.pbe;version=1.9.1_2;
>
> to Import-Package. Then I see the following error:
>
> Error executing command: Could not start bundle
> mvm:harad.test/encconfig/0.0.1-SNAPSHOT in feature(s) CONFIG-TEST-0.0.1: Uses
> constraint violation. Unable to resolve module encconfig [4421.0] because it
> is exposed to package 'org.jasypt.encryption.pbe.config' from modules
> org.apache.servicemix.bundles.jasypt [47.0] and
> org.apache.servicemix.bundles.jasypt [4420.0] via two dependency chains.
>
> Chain 1:
> encconfig [4421.0]
> import: (package=org.jasypt.encryption.pbe.config)
> |
> export: package=org.jasypt.encryption.pbe.config
> org.apache.servicemix.bundles.jasypt [47.0]
>
> Chain 2:
> encconfig [4421.0]
> import: (&(package=org.jasypt.encryption.pbe)(version>=1.9.1.2))
> |
> export: package=org.jasypt.encryption.pbe;
> uses:=org.jasypt.encryption.pbe.config
> export: package=org.jasypt.encryption.pbe.config
> org.apache.servicemix.bundles.jasypt [4420.0]
>
> The blueprint looks pretty much like [1], only thing is that the property
> “passwordEnvName” has to be “password” to make it work within the deploy
> folder. But I tried both and neither password nor passwordEnvName works from
> within the bundle. The camel part like [2].
>
> And I found [3] which is exactly what I try to do (so I don’t include my
> blueprint for now) but it does not work either.
>
> What am I missing??? Thanks for any comment.
>
> Regards,
> harald
>
> [1]
> http://blog.nanthrax.net/2014/10/encrypt-configadmin-properties-values-in-apache-karaf/
> [2] http://camel.apache.org/jasypt.html
> [3]
> http://stackoverflow.com/questions/24825073/using-jasypt-outside-camel-context
--
Krzysztof Sobkowiak
JEE & OSS Architect
Apache Software Foundation Member
Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC chair
Senior Solution Architect @ Capgemini SSC <http://www.pl.capgemini-sdm.com/en/>