Spring and JBoss AS7
shep Jul 8, 2011 5:05 PMI have been working on migrating an application that utilizes spring 2.5.6 and runs on a Jetty server instance over to JBoss AS 7. This so far has not been an easy task. I started at AS 6 and have jumped to AS 7 with more success. However I am hitting an issue loading my spring context files that has to do with depencies.
Here is the error:
Initializing Spring root WebApplicationContext
16:29:33,246 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/accunurse]] (MSC service thread 1-7
) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoade
rListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourceQueueService'
: Injection of resource methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Err
or creating bean with name 'queueProcessorChain' defined in ServletContext resource [/WEB-INF/spring/context-queue.xml]:
Cannot resolve reference to bean 'queueSelfHarmService' while setting constructor argument with key [15]; nested except
ion is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'queueSelfHarmService': In
jection of resource methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error c
reating bean with name 'pageSender': Injection of resource methods failed; nested exception is org.springframework.beans
.factory.NoSuchBeanDefinitionException: No unique bean of type [com.vocollecthealthcare.yosemite.device.DeviceDatastore]
is defined: Unsatisfied dependency of type [interface com.vocollecthealthcare.yosemite.device.DeviceDatastore]: expecte
d at least 1 matching bean
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnno
tationBeanPostProcessor.java:305) [spring-2.5.6.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:998) [spring-2.5.6.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:472) [spring-2.5.6.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBea
nFactory.java:409) [spring-2.5.6.jar:]
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_25]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:380) [spring-2.5.6.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spri
ng-2.5.6.jar:]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:222) [spring-2.5.6.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring
I am not sure why I am getting this in JBoss. The spring context files work fine on the Jetty server why doesn't it work in JBoss. Do I need some additional JBoss specific mappings somewhere? All documentation seems to point at older JBoss versions and I am not sure where to go from here.
Also, to deploy in JBoss I am using an exploded war directory structure. My war deploys but doesn't start.
Any guidance on this would be great.