Jasypt Users Forum

Re: cannot find my registered string encryptor

by szygy :: Rate this Message:

Reply to Author | View in Thread

+------------------------+
  Jasypt Users List      
  http://www.jasypt.org 
+------------------------+

Problem fixed... for those who are curious, it looks like the problem is just that my application context files couldn't be loaded when running my JUnit test because they weren't in the classpath.

My solution was to copy the application context file to the same folder as my JUnit test, and then manually set the classpatch to include that file.

Not the most elegant solution, but it does work. Still on the lookout for something that won't force me to copy the applicationContext file.


On Wed, Oct 28, 2009 at 8:12 PM, Stephen Dewey <stepheneliotdewey@...> wrote:
I have looked all over the web but can't seem to find anything addressing a situation like this...

I have a simple column that I am trying to encrypt. I have specified the type as encrypted in the .hbm.xml file associated with the POJO itself, where I provide the name of the registered encryptor in the typedef element.

If I register the encryptor within the code itself (i.e. by executing actual Java code to register the encryptor), everything works and my stuff is saved encrypted.

However, if instead of executing Java code, I simply place a bean in applicationContext.xml (or applicationContext-dao.xml in my case), and simply copy that XML bean in, I get an error "No string encryptor registered for hibernate with name 'jasyptHibernateEncryptor'"

I am following the instructions laid out at:
http://www.jasypt.org/hibernate3.html

There isn't a spelling error or anything. Any idea what I should look for?


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jasypt-users mailing list
jasypt-users@...
https://lists.sourceforge.net/lists/listinfo/jasypt-users