2

When trying to use classes of the org.apache.commons.collections4 jar in my web application deployed on TomEE 1.6.0.2 (Tomcat 7.0.53) I get a ClassNotFoundException.

I stripped down the web application to just one simple HttpServlet doing nothing else but calling a method on CollectionUtils. In the pom.xml there's nothing else but the dependency to org.apache.commons.collections4. When deployed, the jar is in WEB-INF/lib. But the exception is still being thrown.

When using the classes from apache commons collections 3.2.1, everything is fine.

Any tips and hints that help to find the problem's origin are much appreciated! Thanks, Felix

Felix Siegrist
  • 275
  • 3
  • 8
  • Problem solved. See [here](http://tomee-openejb.979440.n4.nabble.com/ClassNotFoundException-on-TomEE-1-6-0-2-for-org-apache-commons-collections4-classes-td4671656.html). – Felix Siegrist Sep 05 '14 at 07:20
  • I just run into this issue today, except it was a `NoClassDefFoundError` (in Spring's `AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors`). Strangely I could not find older references to this issue! – Didier L Sep 05 '14 at 09:01

1 Answers1

2

I had to add openejb.classloader.forced-load=org.apache.commons.collections4 in conf/system.properties