Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Liferay 6.0 SP1 Spring Portlet FilterClassLoader unable to find a resource available on classpath

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic