我正在尝试通过以下配置在 spring 中创建 bean 的映射。
<util:map id="utilBeansMap" map-class="java.util.HashMap">
<entry key="getFlightsLogger">
<bean
class="com.test.package.bean1" />
</entry>
<entry key="getOnDLogger">
<bean
class="com.test.package.bean2" />
</entry>
</util:map>
然后使用这个 Map 作为资源注入另一个 bean(比如 UserSerice)
@Resource(name = "utilBeansMap")
private Map<String, BaseUtilBean> utilBeansMap;
但是当我试图从这个地图中获取 bean 时,我得到了空指针。
我看了看日志。日志显示此映射 bean 已初始化,但当 UserService 开始启动此映射 bean 时,此映射 bean 已被销毁。
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'utilBeansMap'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'utilBeansMap'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'utilBeansMap' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name 'utilBeansMap'
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'utilBeansMap'
DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'utilBeansMap'
DEBUG DefaultListableBeanFactory - Returning cached instance of singleton bean 'utilBeansMap'
如何解决这个问题,我尝试@DependsOn("utilBeansMap")
在 UserService 上使用注释,但没有奏效。
请帮忙。
最终日志:
18:57:24,898 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testProject]] (ServerService Thread Pool -- 63) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'salesAreaServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.user.IUserService com.test.package.service.admin.data.impl.SalesAreaServiceImpl.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.config.setting.IConfigColorSettingsService com.test.package.service.admin.user.impl.UserServiceImpl.userSettingService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configColorSettingsServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) [spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_43]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.user.IUserService com.test.package.service.admin.data.impl.SalesAreaServiceImpl.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.config.setting.IConfigColorSettingsService com.test.package.service.admin.user.impl.UserServiceImpl.userSettingService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configColorSettingsServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.config.setting.IConfigColorSettingsService com.test.package.service.admin.user.impl.UserServiceImpl.userSettingService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configColorSettingsServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:910) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:853) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:768) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.config.setting.IConfigColorSettingsService com.test.package.service.admin.user.impl.UserServiceImpl.userSettingService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configColorSettingsServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 38 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configColorSettingsServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:910) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:853) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:768) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 40 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.package.service.admin.setting.IAdminColorSettingsService com.test.package.service.config.setting.impl.ConfigColorSettingsServiceImpl.adminColorSettingsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 51 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService' defined in file [E:\testProjectJavaWorkspace\testProject_dev\testProject\rm-services\target\classes\com.test.package\service\admin\setting\impl\UserService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1013) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:959) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:910) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:853) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:768) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 53 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.test.package.service.admin.setting.impl.UserService]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) [spring-beans-3.2.2.RELEASE.jar:]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1006) [spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 64 more
Caused by: java.lang.NullPointerException
at com.test.package.service.admin.setting.impl.UserService.<init>(UserService.java:74) [:]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_43]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_43]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_43]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_43]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) [spring-beans-3.2.2.RELEASE.jar:]
... 66 more
18:57:24,917 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 63) JBWEB001103: Error detected during context /testProject start, will stop it
18:57:24,979 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testProject]] (ServerService Thread Pool -- 63) Closing Spring root WebApplicationContext
18:57:24,990 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 63) MSC000001: Failed to start service jboss.web.deployment.default-host./testProject: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./testProject: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_43]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
... 7 more