Springboot Consolidated CXF Version exception Java.lang.NoClassDefFoundError:ServletRegistrationBean

Source: Internet
Author: User

When using the Springboot project to integrate the WebService component CXF, at startup, the exception is thrown as follows, and the reference data is initially judged to be a version issue. Normal startup After upgrading to a higher version.

CXF has just started to use version 3.1.7 after the update to 3.2.5.

Reference:

Spring boot 1.4 corresponds to CXF-SPRING-BOOT-STARTER-JAXWS version 3.1.X

Spring boot 1.5 corresponds to CXF-SPRING-BOOT-STARTER-JAXWS version 3.2.X

80556676 (Thanks)

https://stackoverflow.com/questions/44731070/ Upgrading-spring-boot-1-4-4-to-1-5-4-noclassdeffounderror-servletregistration (Thank you)

<dependency>            <groupId>org.apache.cxf</groupId>            <artifactId> Cxf-spring-boot-starter-jaxws</artifactid>            <!--<version>3.1.7</version>--
<version>3.2.5</version>

</dependency>
Exception in thread "Restartedmain"java.lang.reflect.InvocationTargetException at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at S Un.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java:62) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (Method.java:498) at Org.springframework.boot.devtools.restart.RestartLauncher.run (Restartlauncher.java:49) caused by:java.lang.NoClassDefFoundError:org/springframework/boot/context/embedded/Servletregistrationbean at Java.lang.Class.getDeclaredMethods0 (Native Method) at java.lang.Class.privateGetDecl Aredmethods (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.zhaopin.CampusApp.main (Campusapp.java:11)    ... 5morecaused by:java.lang.ClassNotFoundException: Org.springframework.boot.context.embedded.ServletRegistrationBean at Java.net.URLClassLoader.findClass ( URLClassLoader.java:381) at Java.lang.ClassLoader.loadClass (Classloader.java:424) at Sun.misc.launcher$appclassloader.loadclass (Launcher.java:331) at Java.lang.ClassLoader.loadClass (Classloader.java:357)    ... More

Springboot Consolidated CXF Version exception Java.lang.NoClassDefFoundError:ServletRegistrationBean

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.