Error creating bean with name 'fisServer' defined in ServletContext resource [/WEB-INF&#

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error creating bean with name 'fisServer' defined in ServletContext resource [/WEB-INF&#相关的知识,希望对你有一定的参考价值。

为什么我在本地上测试都好使,一点错误都没有,远程在服务器上直接用tomcat6直接启动服务,就出现很多的错误,请各位大侠帮帮忙 本人QQ:1447754
严重: 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 'fisServer' defined in ServletContext resource [/WEB-INF/classes/Spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
web.XML 根本没有问题啊,我在本地测试全部通过, 一远程到服务器上 启动tomcat就报错,希望会的大侠加下我QQ 1447754

参考技术A 那就是你服务器里项目的配置少了东西 或 配置 问题是你的服务器加载的时候 你spring配置文件里的bean不能初始化 检查下web.xml 和 spring 配置文件 参考技术B 字面 原因:空指针异常导致 fisServer bean 不能初始化
看下XML文件配置
参考技术C 空指针异常导致 fisServer bean 不能初始化。本回答被提问者和网友采纳

Error creating bean with name

今天碰到一个特别奇怪的问题:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ecfCustomerEditService‘: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sinosoft.framework.service.TransformService com.sinosoft.ecif.service.impl.ECIFCustomerEditServiceImpl.transformService


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transformService‘: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.sinosoft.framework.service.impl.TransformServiceImpl.trasnObject(java.lang.Object); nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [java.lang.Object] is defined: expected single matching bean but found 88: 


有一种感觉是这里的问题transformService,但是没找到具体原因,三个项目只要引入了transformService启动就报错,通过同事的帮忙,先是把用到transformService的地方全注释掉,就没有问题了,问题定位到了transformService这里,最后发现在transformServiceImpl里面事项方法上面写了

@Autowired

导致重复注入了,有时间看看autowired的原理在补充.....

本文出自 “summit” 博客,请务必保留此出处http://786678398.blog.51cto.com/2082557/1929473

以上是关于Error creating bean with name 'fisServer' defined in ServletContext resource [/WEB-INF&#的主要内容,如果未能解决你的问题,请参考以下文章

Error creating bean with name ‘requestMappingHandlerMapping‘

react(85)--error:Error creating bean with name ‘onlineStudyController‘:

Error creating bean with name 'eurekaAutoServiceRegistration'

Spring 报错:Error creating bean with name

Error creating bean with name

Error creating bean with name 'transactionManager'