When I have blueprint.xml directly put in $KARAF_HOME/deploy folder (such as a 
data source service definition), works without any issues but when the 
blueprint.xml is inside a bundle and when the bundle is getting installed 
getting class not found exception. Solved this by adding 
org.jasypt.encryption.pbe;version=1.9.1_2;  to Export-package in bundle's 
pom.xml. This is the right way to solve the issue?

regards
Vinu

From: Vinuraj M
Sent: Monday, February 16, 2015 6:40 PM
To: [email protected]
Subject: Jasypt encryption

Using Apache Karaf 3.0.1

Trying to use encrypted database passwords from .cfg file as described in [1] 
using property placeholders

       <enc:property-placeholder>
              <enc:encryptor 
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
                     <property name="config">
                           <bean 
class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
                                  <property name="algorithm" 
value="PBEWithMD5AndDES" />
                                  <property name="passwordEnvName" value="ABCD" 
/>
                           </bean>
                     </property>
              </enc:encryptor>
       </enc:property-placeholder>

Getting exception Caused by: java.lang.ClassNotFoundException: 
org.jasypt.encryption.pbe.StandardPBEStringEncryptor not found by config-mgr 
[151]. What could be the reason ?
I have installed jasypt-encryption feature.

karaf@root()> feature:info jasypt-encryption
Feature jasypt-encryption 3.0.1
Description:
  Advanced encryption support for Karaf security
Feature has no configuration
Feature has no configuration files
Feature has no dependencies.
Feature contains followed bundles:
  mvn:commons-codec/commons-codec/1.9 start-level=30
  mvn:commons-lang/commons-lang/2.6 start-level=30
  
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.9.1_1  
start-level=30
  mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.jasypt/3.0.1 start-level=30
Feature has no conditionals.

[1] 
http://blog.nanthrax.net/2014/10/encrypt-configadmin-properties-values-in-apache-karaf/

Reply via email to