Announcement Announcement Module
Collapse
No announcement yet.
Upgrading to Spring 3.0.5 Help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrading to Spring 3.0.5 Help

    Hello,

    I'm trying to upgrade my web app to use Spring 3.0.5 (3.0.5.RELEASE) and spring security 3.1.0.M1 and its seems like my application isn't configuring Spring properly as the exception below tells me Spring can't find any Spring beans. Any ideas on how to better troubleshoot this?

    properties values:
    spring.version = 3.0.5.RELEASE
    spring.security.version = 3.1.0.M1

    POM.xml Spring Dependencies:
    <!-- *Start* Spring Dependencies -->
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jms</artifactId>
    <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>${spring.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>${spring.security.version}</version>
    <exclusions>
    <exclusion>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
    </exclusion>
    </exclusions>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>${spring.security.version}</version>
    <exclusions>
    <exclusion>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
    </exclusion>
    </exclusions>
    </dependency>

    <!-- *End* Spring Dependencies -->

    Runtime Exception:
    2010-12-06 15:51:15,057 [pool-1-thread-6] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'stuMessageListener': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Could not autowire field: spot.api.service.backoffice.LookupService spot.api.listener.backoffice.STUMessageListener.es nLookupService; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'lookupService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Could not autowire field: spot.api.service.backoffice.GenericCacheCRUD spot.api.service.impl.backoffice.LookupServiceImpl .commercialCustomerCacheCRUD; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'genericCacheCRUD': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Could not autowire field: spot.api.service.backoffice.CacheFactory spot.api.service.backoffice.GenericCacheCRUD.senso rCacheFactory; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No matching bean of type [spot.api.service.backoffice.CacheFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Aut owired(required=true), @org.springframework.beans.factory.annotation.Qual ifier(value=sensorCache)}
    at org.springframework.beans.factory.annotation.Autow iredAnnotationBeanPostProcessor.postProcessPropert yValues(AutowiredAnnotationBeanPostProcessor.java: 285)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1074)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4655)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:5364)
    at com.sun.enterprise.web.WebModule.start(WebModule.j ava:345)
    at com.sun.enterprise.web.LifecycleStarter.doRun(Life cycleStarter.java:58)
    at com.sun.appserv.management.util.misc.RunnableBase. runSync(RunnableBase.java:304)
    at com.sun.appserv.management.util.misc.RunnableBase. run(RunnableBase.java:341)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Working...
X