Solved.
Everything works well doing some executions, I initialize Spring container (is a web app) 5 or 6 times and then...
Caused by: org.jasypt.exceptions.EncryptionInitializationException: No string encryptor registered for hibernate with name "strongHibernateStringEncryptor"
at org.jasypt.hibernate.type.AbstractEncryptedAsStringType.checkInitialization(AbstractEncryptedAsStringType.java:250)
at org.jasypt.hibernate.type.AbstractEncryptedAsStringType.nullSafeGet(AbstractEncryptedAsStringType.java:142)
at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:105)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
Any ideas?.
jmiranda wrote:
Hi!
I would like to encrypt some attributes of an entity in a transparent way when I persist it into database using Hibernate. I've followed the guide:
http://www.jasypt.org/hibernate3.html and it works like a charm.
The problem is that when I want to get back the entity from database I would like to get the entity with all attributes decryted. I don't know if I am missing something important but I get the attributes encrypted.
I've followed all the steps of the guide. Any ideas?.
Thanks in advance.