Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/web/socket/server/standard/ServerEndpointExporter
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:570)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:697)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:640)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:609)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1484)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:425)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:515)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:508)
    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1188)
    at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:818)
    at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:804)
    at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:790)
    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:744)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
    at com.ros.RosApplication.main(RosApplication.java:19)
Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 24 more

是因为我在包的引用过程中加入了在编译时才使用这个类

<dependency>   <groupId>org.springframework.boot</groupId>   <artifactId>spring-boot-starter-websocket</artifactId>   <scope>provided</scope></dependency>

原文地址:https://www.cnblogs.com/youran-he/p/9591323.html

时间: 2024-10-11 22:55:01

Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter的相关文章

maven项目出现:Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

今天安装和部署maven项目的时候一直都出现这样的错误:  maven项目出现:Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener  按照网上的好多都是说spring.jar包什么的问题,但是我这个项目修改了也没有效果的样子,后来自己尝试了一下,发现是maven的包没成功导入项目中: 在eclipse中:如果在这样:右击 Maven project -

idea 中 Caused by: java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener

idea  中 Caused by: java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener 项目启动出现未知错误: 代码未错,即为idea配置问题: 解決 在IDEA中点击File > Project Structure > Artifacts > 在右侧Output Layout右击项目名,选择Put into Output Root. ?执行后,在WEB-I

Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter

严重: StandardWrapper.Throwableorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested excepti

Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext

1.错误描述 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/smp]] at java.util.concurre

Caused by: java.lang.ClassNotFoundException: org.springframework.orm.hibernate4.HibernateTemplate

1.错误描述 严重: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate4.HibernateTemplate] for bean with name 'hibernateTemplate' defined in ServletContext resourc

Caused by: java.lang.ClassNotFoundException: org.springframework.expression.ExpressionParser

1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-12 0:44:33 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using

Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware

1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-12 0:25:53 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using

java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener问题解决

今天搭建SSH项目的时候出现了例如以下错误: 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 网上查了一下.有些人说是没有spring的相关包.可是我检查这个包

maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

maven 导入项目中经常出现这个问题 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 在网上找了些资料,有的说是少jar包,把有关spring的jar包复制到