EncryptablePropertySourceWrapper cannot be cast to org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource

224 views Asked by At

I am trying to upgrade my spring boot project from spring boot 1.5.3.RELEASE to 2.7.10 which has jasypt 1.12 jar. I am getting below error when i run the Spring boot application. I tried with different latest version of jasypt. but no luck. Caused by: java.lang.ClassCastException: com.ulisesbocchio.jasyptspringboot.wrapper.EncryptablePropertySourceWrapper cannot be cast to org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getAttached(ConfigurationPropertySourcesPropertyResolver.java:102) ~[spring-boot-2.7.10.jar:2.7.10] at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.findPropertyValue(ConfigurationPropertySourcesPropertyResolver.java:85) ~[spring-boot-2.7.10.jar:2.7.10] at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getProperty(ConfigurationPropertySourcesPropertyResolver.java:74) ~[spring-boot-2.7.10.jar:2.7.10] at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getProperty(ConfigurationPropertySourcesPropertyResolver.java:65) ~[spring-boot-2.7.10.jar:2.7.10] at org.springframework.core.env.AbstractPropertyResolver.getProperty(AbstractPropertyResolver.java:175) ~[spring-core-5.3.26.jar:5.3.26] at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:610) ~[spring-core-5.3.26.jar:5.3.26] at org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration.methodValidationPostProcessor(ValidationAutoConfiguration.java:72) ~[spring-boot-autoconfigure-2.7.10.jar:2.7.10] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.26.jar:5.3.26]

I tried with different latest version of jasypt. but no luck.

0

There are 0 answers