title: context:component-scan does not seem to be working (from included jar/package)
body: <p>I have a project that is using spring just fine to create beans and do component scans of its own classes. I then include a Jar into the build path for another project that I need to add things in for. I can create beans all day, but when I do a component scan it doesn't seem to do anything.</p>
  
  <p>I started with this</p>
  
  <pre><code>&lt;context:component-scan base-package="com.company.mainPackage.dao.hibernate" /&gt;
  </code></pre>
  
  <p>Then changed to this</p>
  
  <pre><code>&lt;context:component-scan base-package="com.company.mainPackage.dao.hibernate" /&gt;
  &lt;context:component-scan base-package="com.company.jarPackage.dao.hibernate" /&gt;
  </code></pre>
  
  <p>That didn't work so I tried this</p>
  
  <pre><code>&lt;context:component-scan base-package="com.company.mainPackage.dao.hibernate, com.company.jarPackage.dao.hibernate" /&gt;
  </code></pre>
  
  <p>The only errors that display are that my bean cannot be found to do my autowiring. The classes from "mainPackage" can be found, but not from "jarPackage".</p>
  
  <p>All classes in both packages use the @Repository annotation.</p>
  
  <p>I also tried removing the Jar and just including the project directly on the build path in eclipse but that changed nothing.</p>
  
  <p>Obviously the build path is working correctly as i can create individual beans.</p>
  
  <pre><code>10:29:14 ERROR - ContextLoader.initWebApplicationContext(219) | Context initialization failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.company.jarPackage.dao.IGetSomethingDAO com.company.myPackage.service.MyService.someDAO; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.company.jarPackage.dao.IGetSomethingDAO] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
      at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
      at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
      at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
      at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      at org.mortbay.jetty.Server.doStart(Server.java:222)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
      at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
      at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
      at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
      at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
      at com.google.gwt.dev.DevMode.main(DevMode.java:311)
  Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.company.jarPackage.dao.IGetSomethingDAO com.company.myPackage.service.MyService.someDAO; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.company.jarPackage.dao.IGetSomethingDAO] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:507)
      at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
      ... 31 more
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.company.jarPackage.dao.IGetSomethingDAO] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:901)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:770)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:685)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
      ... 33 more
  </code></pre>
  
  <p>This was in the logs when I turned on spring logging. It's like it's not finding anything...</p>
  
  <pre><code>13:14:50 DEBUG - PathMatchingResourcePatternResolver.findPathMatchingResources(355) | Resolved location pattern [classpath*:com/company/jarPackage/dao/**/*.class] to resources []
  </code></pre>