+------------------------+
Jasypt Users List
http://www.jasypt.org
+------------------------+
Rajib,
Thank you very much for your point on the JavaDoc errors. I have
already fixed it at the CVS and it will be fine in the next version of
Jasypt.
Regards,
Daniel.
Rajib D wrote:
+------------------------+
Jasypt Users List
http://www.jasypt.org
+------------------------+
Hi All,
I was able to resolve my problem.
If you note my entries for "PasswordEncoder" in My-Securities.xml I've
mentioned something like this --
<bean id="passwordEncoder"
class="org.jasypt.springsecurity.PasswordEncoder">
I copied this from Jasypt Java API docs but should have verified with
Jasypt+SpringSecurity guidlelines. The API doc page for
"org.jasypt.spring.security2 Class PasswordEncoder" incorrectly mentions it
as above, however the correct one should be -
<bean id="passwordEncoder"
class="org.jasypt.spring.security2.PasswordEncoder">
Note: In the one given in API docs page, the "." (dot) between "spring" and
"security" is missing and also for those of us who wants to use
SpringSecurity instead of Acegi, it should be "security2".
I hope this is going to be corrected in the next release of the Java Doc
APIs of Jasypt.
Thanks
Rajib
Rajib D wrote:
Hi,
I'm using SpringSecurity 2.0.3 and trying to JASYPT for password
encryption. However while trying to deploy my apps I'm getting the
following exception. Can anyone give some idea what's going wrong. I'm
currently using tomcat-6 on jdk5 but if required can upgrade to jdk6.
The exception in my tomcat's log file -
---------------------------------------------------------------------------------------
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.jasypt.springsecurity.PasswordEncoder] for bean
with name 'passwordEncoder' defined in URL
[file:/C:/apache-tomcat-6.0.16/webapps/family/WEB-INF/classes/My-security.xml];
nested exception is java.lang.ClassNotFoundException:
org.jasypt.springsecurity.PasswordEncoder
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1102)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:386)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 87 more
Caused by: java.lang.ClassNotFoundException:
org.jasypt.springsecurity.PasswordEncoder
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:381)
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1135)
-------------------------------------------------------------------------------------
And the specific conents of my services.xml and security.xml are
My-Services.xml
----------------------------------------------------------------------------------
<!-- AUTHENTICATION SERVICE -->
<bean id="jasyptPasswordEncryptor"
class="org.jasypt.util.password.BasicPasswordEncryptor" />
<bean id="anAuthenticationService"
class="org.deys.family.service.authentication.AuthenticationServiceImpl">
<property name="passwordEncryptor">
<ref bean="jasyptPasswordEncryptor"/>
</property>
</bean>
---------------------------------------------------------------------------------
My-Security.xml
----------------------------------------------------------------------------------
<bean id="passwordEncoder"
class="org.jasypt.springsecurity.PasswordEncoder">
<property name="passwordEncryptor">
<ref bean="jasyptPasswordEncryptor" />
</property>
</bean>
<bean id="daoAuthenticationProvider"
class="org.springframework.security.providers.dao.DaoAuthenticationProvider">
<property name="userDetailsService"
ref="anAuthenticationService"/>
<property name="passwordEncoder">
<ref bean="passwordEncoder" />
</property>
</bean>
---------------------------------------------------------------------------------
Thanks in advance
- Rajib
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
jasypt-users mailing list
jasypt-users@...
https://lists.sourceforge.net/lists/listinfo/jasypt-users