`
k1280000
  • 浏览: 203449 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initializa

    博客分类:
  • Flex
阅读更多

un 27, 2011 11:29:12 AM org.springframework.web.servlet.FrameworkServlet initServletBean

SEVERE: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is java.lang.NullPointerException

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)

 

 

出这个错是因为我的web.xml里配置了两段

 

  <listener>

  <listener-class>

  org.springframework.web.context.ContextLoaderListener

  </listener-class>

  </listener>

 

and

 

<servlet-name>flexspring</servlet-name>

   <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

 

这样会加载两次,把前面的listener去掉就OK了!

 

 

 

 

 

 

分享到:
评论
2 楼 rtttyu23 2013-05-06  
不错,没报错了...这些配置的文件真麻烦,不深入了解,配置的很费时.
1 楼 thinkcq168 2012-11-07  
这样还是不可以,还是报错,我也有同样的错误,求高手!

相关推荐

Global site tag (gtag.js) - Google Analytics