• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic