Hi ,

We are using apache-karaf-3.0.2 on unix .
To make confiburable impementation , we have created 2  files  in etc/
directory
1)re.properties  - It is containing the properties which are used in 
***bean.xml  file 
2)reRoutes.properties  -It is containing the properties which are usied
**camel-context file  for  configuring differnt  routes  properties values 

re.Properties contains encyrpted passwords( encyrpted by using jasypt) 
whereas reRoutes does not contain any encrypted values . 
**bean.xml looks like  as below 
<ext:property-placeholder>
                <ext:location>file:etc/re.properties</ext:location>
        </ext:property-placeholder>
         <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="password" 
value="${RE_JASYPT_ENCRYPTION_PASSWORD}" />
                                </bean>
                        </property>
                </enc:encryptor>
        </enc:property-placeholder> 
        
and **camel-context looks like 
<ext:property-placeholder id="coreCamel" placeholder-prefix="@("
placeholder-suffix=")">
                <ext:location>file:etc/reRoutes.properties</ext:location>
        </ext:property-placeholder>
        
        <camelContext id="camel"
                xmlns="http://camel.apache.org/schema/blueprint"; trace="false"
                handleFault="true">
                                
                <errorHandler id="erroHandler" 
redeliveryPolicyRef="defaultPolicy" />
                <routeBuilder ref="jmxRouteBuilder"/>   
                <redeliveryPolicyProfile id="defaultPolicy"
                
maximumRedeliveries="{{re.context.camel.exceptionPolicy.maximumRedeliveries}}"
redeliveryDelay="{{re.context.camel.exceptionPolicy.redeliveryDelay}}"
retryAttemptedLogLevel="WARN" />
                <onException redeliveryPolicyRef="defaultPolicy">
                        <exception>java.lang.Exception</exception>
                        <handled>
                                <constant>true</constant>
                        </handled>
                        <bean ref="errorHandlerBean" />
                        <convertBodyTo type="com.gemalto.openapi.SoapMap" />
                </onException>          
                <route id="openApi" trace="true">
                        <from uri="openAPI" />
                        <onException>
                                <exception>java.lang.Exception</exception>
                                <redeliveryPolicy logRetryAttempted="true"
                                        retryAttemptedLogLevel="WARN"
maximumRedeliveries="{{re.context.camel.openApiRoute.maximumRedeliveries}}"
/>
                                        .............
                                        
        Now  in **camel-context.xml file  we are not using any ecnryped values ,
but still when we try to install application , it is giving below  error 
while calculating value for maximumRedeliveries
        
Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException
        at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:1055)
        at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)
        at
org.apache.karaf.jaas.jasypt.handler.EncryptablePropertyPlaceholder.getProperty(EncryptablePropertyPlaceholder.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.7.0_25]
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
        at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
        at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1001)

Can you please help me if anything is missed  from our  side ?

Thanks
Prithvi



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Getting-Encryption-Exception-when-encryption-is-not-used-tp4037593.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Reply via email to