posted 12 years ago
I have com.springsource.javax.validation-1.0.0.GA.jar (JSR 303 framework) and hibernate-validator-4.2.0.Final.jar (Reference Implementation for JSR 303 framework)
available at <LIFERAY_PORTAL_ROOT>/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib.
All the portlet plugins are able to find the implementation class org.hibernate.validator.HibernateValidator
[META-INF/services/javax.validation.spi.ValidationProvider implementation in hibernate-validator-4.2.0.Final.jar]
and the classloader in context is found to be following by JSR 303 validation framework:
WebappClassLoader
context:
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@6c585a
But when kaleo-web plugin deployment is started the classloader changes to com.liferay.portal.spring.util.FilterClassLoader due to
a org.springframework.beans.factory.config.BeanFactoryPostProcessor registered in the spring's application context for kaleo
(<LIFERAY_PORTAL_ROOT>/tomcat-6.0.29/webapps/kaleo-web/WEB-INF/classes/META-INF/base-spring.xml)
The Liferay's implementation of org.springframework.beans.factory.config.BeanFactoryPostProcessor is as below:
And the com.liferay.portal.spring.util.FilterClassLoader is unable to find the implementation for resource META-INF/services/javax.validation.spi.ValidationProvider
which fails the kaleo-web plugin initialization by Spring framework saying "Unable to find a default provider".
Can anybody provide some guidance on how to resolve this or rather how to make the custom classloader com.liferay.portal.spring.util.FilterClassLoader find the required resource
in the server?
Regards,
Jignesh
The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU