`
bugyun
  • 浏览: 556006 次
社区版块
存档分类
最新评论

Error creating bean with name 'webSocketHandlerMapping'

 
阅读更多

解决方式:tomcat 换成 8.0

 

ERROR|2016-05-12 17:14:17,321|0|01|1.2.3|org.springframework.web.context.ContextLoader|initWebApplicationContext(351)|Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerMapping]: Factory method 'webSocketHandlerMapping' threw exception; nested exception is java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) [catalina.jar:7.0.40]

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) [catalina.jar:7.0.40]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.40]

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.40]

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.40]

at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [?:1.7.0_45]

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerMapping]: Factory method 'webSocketHandlerMapping' threw exception; nested exception is java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

... 23 more

Caused by: java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found

at org.springframework.web.socket.server.support.AbstractHandshakeHandler.initRequestUpgradeStrategy(AbstractHandshakeHandler.java:145) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.server.support.AbstractHandshakeHandler.<init>(AbstractHandshakeHandler.java:111) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.server.support.DefaultHandshakeHandler.<init>(DefaultHandshakeHandler.java:35) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.AbstractWebSocketHandlerRegistration.getOrCreateHandshakeHandler(AbstractWebSocketHandlerRegistration.java:148) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.AbstractWebSocketHandlerRegistration.getMappings(AbstractWebSocketHandlerRegistration.java:135) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry.getHandlerMapping(ServletWebSocketHandlerRegistry.java:98) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.webSocketHandlerMapping(WebSocketConfigurationSupport.java:35) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.DelegatingWebSocketConfiguration$$EnhancerBySpringCGLIB$$2b55119d.CGLIB$webSocketHandlerMapping$3(<generated>) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.DelegatingWebSocketConfiguration$$EnhancerBySpringCGLIB$$2b55119d$$FastClassBySpringCGLIB$$d08d1c16.invoke(<generated>) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.web.socket.config.annotation.DelegatingWebSocketConfiguration$$EnhancerBySpringCGLIB$$2b55119d.webSocketHandlerMapping(<generated>) ~[spring-websocket-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_45]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_45]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_45]

at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_45]

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

... 23 more

 

解决方案参考:http://my.oschina.net/ydsakyclguozi/blog/484710?p=1

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    关于springboot我出过的那些错误.docx

    错误五:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping' 错误原因:...

    org.springframework.web.servlet-3.0.1.RELEASE-A.jar

    Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0' defined in ServletContext resource [/WEB-INF/springMVC-servlet.xml]: Initialization of bean failed;...

    企业后台管理基础框架 hsweb.zip

    hsweb 企业后台管理基础框架业务功能现在:权限管理: 权限资源-角色-用户.配置管理: kv结构,自定义配置.可通过此功能配置数据字典.脚本管理: 动态脚本,支持javascript,groovy,java动态编译执行....

    FusionMaps_Enterprise.rar

    FusionMaps 是一款专业的数据可视化工具,主要用于创建交互式的地图图表。它将复杂的数据转换为易于理解的地理信息图形,广泛应用于商业智能、数据分析和报告等领域。`FusionMaps_Enterprise.rar` 可能是该软件的...

    spring-security-oauth-test.rar

    在本项目中,"spring-security-oauth-test.rar"是一个压缩包,它包含了使用SpringCloud、Spring Security和OAuth2.0实现的权限认证解决方案。这个项目旨在演示如何在微服务架构中构建安全的API访问控制,同时利用...

    Jdk1.8搭建SSh框架所需Jar包

    在Java开发领域,SSH(Struts、Spring、Hibernate)是一个非常经典的MVC(Model-View-Controller)架构的框架组合,常用于构建企业级的Web应用程序。随着技术的发展,JDK版本也在不断更新,从JDK 1.7升级到JDK 1.8时...

    springAOP demo 带错误解决文档

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org....

    asm5.0.jar

    2013-08-12 14:33:37.672:WARN::Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [file:/E:/cloudwave-core/src/main/...

    Spring底层学习:【AOP源码的探究】

    3. 创建:当需要创建bean时,如果该bean需要被代理,`AnnotationAwareAspectJAutoProxyCreator`会被调用。 4. 赋值、初始化:为bean设置属性,如配置的Advisor,然后初始化。 5. 返回:最终创建并返回代理bean。 四...

    解决SpringDataJPA报错:org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null w

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/...

    Maven解决jar冲突调试步骤

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in ServletContext resource [/WEB-INF/spring/tbm_web_shiro.xml]: Cannot resolve reference to...

    maven下mybatis-plus和pagehelp冲突问题的解决方法

    在开发Java Web应用程序时,我们经常使用MyBatis-Plus(MyBatis的扩展)和PageHelper这两个优秀的数据访问框架来简化数据库操作和实现分页功能。然而,当这两个库同时存在于同一个项目中时,可能会出现依赖冲突的...

    com.springsource.org.objectweb.asm-3.2.0.jar

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customAreaService' defined in class path resource [applicationContext.xml]: Initialization of bean failed;...

    在学习中发现的一些ssh-error

    对于Hibernate,错误`org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in resource`可能是因为缺少JTA(Java Transaction API)的支持,例如找...

    org.springframework.transaction-3.1.2.RELEASE.zip

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0': Error setting property values; nested ...

    spring框架进行简单的增加操作出现的错误,解决方法

    Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class ...

    ssmDemo1:SSM框架整合练习项目 来自《2017-7黑马49期web》

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [F:\IdeaProjects\ssmDemo1\out\artifacts\ssmDemo1_war_exp

    java工程错误信息解析和总结

    15:53:53,359 ERROR [common] 获取默认数据源 Error creating bean with name 'dataSource' defined in resource loaded through InputStream: Initialization of bean failed; nested exception is javax.naming....

    SSH整合项目中容易出现的错误

    Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/...

Global site tag (gtag.js) - Google Analytics