title: Tomcat doesn't seem to be picking up jars in my WEB-INF/lib folder
body: <p>I have a maven pom that builds all my required libraries into my WEB-INF/lib folder, then packages it up as a war. When I try to deploy this war, Tomcat throws many ClassNotFoundExceptions - the latest one being "java.lang.ClassNotFoundException: javax.xml.bind.annotation.AccessorOrder"; The only way I've found to fix it is to copy the required library files from my WEB-INF/lib folder and tossing them into tomcat/lib, but this can't be the correct way of doing it.</p>
  
  <p>Is there something I have to do to tomcat to make it look in my WEB-INF/lib folders?
  Is there something I have to do in my source to tell tomcat to look there?
  Am I stuck having to have my tomcat/lib folder filled with 50+ jars?</p>
  
  <p>Maybe it's relevant, but I'm using CXF and Spring-MVC technologies.</p>
  
  <p>I'd post source code, but I don't know which file to put, so I'll post this current error:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'publisher' defined in ServletContext resource [/WEB-INF/forum-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [publisher.Publisher]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/annotation/AccessorOrder    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)  at java.security.AccessController.doPrivileged(Native Method)
  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [publisher.Publisher]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/annotation/AccessorOrder
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
      ... 36 more
  Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/AccessorOrder
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(RuntimeModelBuilder.java:59)
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(RuntimeModelBuilder.java:41)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:123)
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
      at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
      at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:198)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
  </code></pre>
  
  <p>Thanks for any help</p>