问题
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean
0
(
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
323
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
D
e
f
a
u
l
t
S
i
n
g
l
e
t
o
n
B
e
a
n
R
e
g
i
s
t
r
y
.
g
e
t
S
i
n
g
l
e
t
o
n
(
D
e
f
a
u
l
t
S
i
n
g
l
e
t
o
n
B
e
a
n
R
e
g
i
s
t
r
y
.
j
a
v
a
:
222
)
a
t
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
s
u
p
p
o
r
t
.
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
d
o
G
e
t
B
e
a
n
(
A
b
s
t
r
a
c
t
B
e
a
n
F
a
c
t
o
r
y
.
j
a
v
a
:
321
)
a
t
o
r
g
.
s
p
r
i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e
s
s
o
r
.
j
a
v
a
:
798
)
a
t
o
r
g
.
a
p
a
c
h
e
.
c
o
y
o
t
e
.
A
b
s
t
r
a
c
t
P
r
o
c
e
s
s
o
r
L
i
g
h
t
.
p
r
o
c
e
s
s
(
A
b
s
t
r
a
c
t
P
r
o
c
e
s
s
o
r
L
i
g
h
t
.
j
a
v
a
:
66
)
a
t
o
r
g
.
a
p
a
c
h
e
.
c
o
y
o
t
e
.
A
b
s
t
r
a
c
t
P
r
o
t
o
c
o
l
0(AbstractBeanFactory.java:323) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:591) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1144) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:763) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol
0(AbstractBeanFactory.java:323)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)atorg.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702)atorg.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668)atorg.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:716)atorg.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:591)atorg.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530)atorg.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170)atjavax.servlet.GenericServlet.init(GenericServlet.java:158)atorg.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1144)atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)atorg.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:763)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)atorg.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)atorg.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
.
d
o
R
u
n
(
N
i
o
E
n
d
p
o
i
n
t
.
j
a
v
a
:
1498
)
a
t
o
r
g
.
a
p
a
c
h
e
.
t
o
m
c
a
t
.
u
t
i
l
.
n
e
t
.
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
B
a
s
e
.
r
u
n
(
S
o
c
k
e
t
P
r
o
c
e
s
s
o
r
B
a
s
e
.
j
a
v
a
:
49
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
r
u
n
W
o
r
k
e
r
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1142
)
a
t
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor
SocketProcessor.doRun(NioEndpoint.java:1498)atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1312)
… 37 more
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.(AllEncompassingFormHttpMessageConverter.java:76)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.(RequestMappingHandlerAdapter.java:205)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204)
… 39 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1360)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1182)
… 46 more
解决方法
这是spring的版本和jackson的版本不兼容造成的,换个版本即可,Spring5配合jackson2.9以上的版本 即可。