0

I would like to deploy my project without /WEB-INF/lib.

I created a folder /usr/share/tomcat7/mylib and move all the files from /WEB-INF/lib. I ordered this directory for common.loader, but the application has stopped running.

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
    ...
Igor Bobko
  • 342
  • 2
  • 13

1 Answers1

2

The error is due to org.hibernate.validator.internal.engine.ConfigurationImpl not spring libraries. Check for hibernate-validator jar

Abhijith Nagarajan
  • 3,865
  • 18
  • 23
  • /usr/share/tomcat7/mylib/hibernate-validator-4.3.1.Final.jar – Igor Bobko Sep 25 '13 at 16:46
  • 1
    Have you set the tomcat classpath to your custom directory. Refer below link on how to set classpath http://stackoverflow.com/questions/1300780/adding-a-directory-to-tomcat-classpath – Abhijith Nagarajan Sep 25 '13 at 16:48
  • common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/common/classes,${catalina.home}/common/*.jar,/usr/share/tomcat7/mylib/*.jar – Igor Bobko Sep 25 '13 at 16:54
  • Do you have SLF4J jar also(dependent jar for hibernate-validator) in the classpath. How are you building your application? – Abhijith Nagarajan Sep 25 '13 at 16:59
  • hey!!!! A added /usr/share/tomcat7/mylib/ and it works!!! But, why /usr/share/tomcat7/mylib/*.jar do not work? – Igor Bobko Sep 25 '13 at 16:59
  • Classpath accept specific files or folders. It does not accept wildcard characters – Abhijith Nagarajan Sep 25 '13 at 17:03