0

I'm creating a Java batch job using Spring Batch and I want to encrypt some of the properties, like database authentication passwords. Jasypt seems to be the most recommended solution and there is good documentation at http://www.jasypt.org/.

However, when I use it in my batch program, I get an error:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.jasypt.org/schema/encryption]
Offending resource: class path resource [thisjob-context.xml]

Has anyone else seen, and resolved, this message? Alternatively, does anyone have any other recommended approaches for encrypting/decrypting properties within Spring Batch?

Woodchuck
  • 3,869
  • 2
  • 39
  • 70
  • 1
    is the jasypt jar on your classpath? – leeor Sep 19 '15 at 09:20
  • 1
    leeor, I'm using Maven and I have 2 jasypt jars in the repository: jasypt.1.9.2.jar and jasypt-spring2-1.9.2.jar. – Woodchuck Sep 20 '15 at 17:01
  • I ran into this or very similar issue. Found that the project's dependency was declared on jasypt-spring31, but type was pom rather than jar--I simply removed the type node as default is jar. Some how comments here were reassuring. – unigeek May 09 '19 at 03:31

0 Answers0