升级到Springframework 5.1.2

时间:2018-11-28 21:34:08

标签: spring migration

我正在尝试将项目从3.1.1升级到5.1.2,我将所有较旧的版本替换为较新的版本,并且没有遇到任何编译错误... 所以我启动了该应用程序,它的价值是在运行WAS 8.5.5。 我得到这个错误

[11/28/18 16:17:06:401 EST] 00000100 SystemOut     O 16:17:06.385 [Default : 6] ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org.springframework.web.bind.annotation.support.HandlerMethodResolver
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1270) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1164) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:304) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:810) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:779) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:587) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:444) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:432) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:772) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1083) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1080) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:64) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:109) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:73) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:398) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:355) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:41010) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.jrInitWebApplicationContext(FrameworkServlet.java:40002) ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) [spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]
    at javax.servlet.GenericServlet.init(GenericServlet.java:161) [javax.j2ee.servlet.jar:?]
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:345) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1369) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:642) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:608) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:426) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:901) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719) [com.ibm.ws.webcontainer.jar:?]
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1211) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.__fireDeployedObjectStart(DeployedApplicationImpl.java:1450) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:55003) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1032) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:795) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1413) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2273) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:654) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5572) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5698) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:668) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:612) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1303) [com.ibm.ws.runtime.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012) ~[?:1.8.0]
    at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83) [?:1.8.0]
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012) ~[?:1.8.0]
    at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263) [?:1.8.0]
    at java.security.AccessController.doPrivileged(AccessController.java:666) [?:1.8.0]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:91) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096) [?:1.8.0]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831) [?:1.8.0]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813) [?:1.8.0]
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) [bootstrap.jar:WAS855.SERV1 [cf141829.03]]
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:249) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:121) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:109) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1734) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcessSynchronousExt(AppBinaryProcessor.java:774) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.bla.sync.BLABinaryProcessor.postProcess(BLABinaryProcessor.java:599) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.bla.sync.BLABinaryProcessor.onChangeCompletion(BLABinaryProcessor.java:476) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.bla.sync.BinaryProcessorWrapper.onChangeCompletion(BinaryProcessorWrapper.java:109) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1938) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1442) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:667) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1998) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1946) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:549) [com.ibm.ws.admin.services.jar:?]
    at com.ibm.ws.management.configservice.ConfigServiceImpl.save(ConfigServiceImpl.java:720) [com.ibm.ws.admin.services.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012) ~[?:1.8.0]
    at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83) [?:1.8.0]
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009) ~[?:1.8.0]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012) ~[?:1.8.0]
    at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263) [?:1.8.0]
    at java.security.AccessController.doPrivileged(AccessController.java:666) [?:1.8.0]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:91) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257) [?:1.8.0]
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096) [?:1.8.0]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831) [?:1.8.0]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813) [?:1.8.0]
    at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) [bootstrap.jar:WAS855.SERV1 [cf141829.03]]
    at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602) [com.ibm.ws.admin.core.jar:?]
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$QueuedWork.run(SSLReadServiceContext.java:2000) [com.ibm.ws.runtime.jar:?]
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892) [com.ibm.ws.runtime.jar:?]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org.springframework.web.bind.annotation.support.HandlerMethodResolver
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:83) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1262) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    ... 130 more
Caused by: java.lang.NoClassDefFoundError: org.springframework.web.bind.annotation.support.HandlerMethodResolver
    at java.lang.J9VMInternals.prepareClassImpl(Native Method) ~[?:2.9 (07-25-2018)]
    at java.lang.J9VMInternals.prepare(J9VMInternals.java:302) ~[?:2.9 (07-25-2018)]
    at java.lang.Class.getDeclaredConstructor(Class.java:719) ~[?:2.9 (07-25-2018)]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1262) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    ... 130 more
Caused by: java.lang.ClassNotFoundException: org.springframework.web.bind.annotation.support.HandlerMethodResolver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:609) ~[?:1.8.0]
    at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243) ~[bootstrap.jar:WAS855.SERV1 [cf141829.03]]
    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:925) ~[?:2.9 (07-25-2018)]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:870) ~[?:2.9 (07-25-2018)]
    at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134) ~[bootstrap.jar:WAS855.SERV1 [cf141829.03]]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:853) ~[?:2.9 (07-25-2018)]
    at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62) ~[com.ibm.ws.runtime.jar:WAS855.SERV1 [cf141829.03]]
    at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58) ~[com.ibm.ws.runtime.jar:WAS855.SERV1 [cf141829.03]]
    at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:618) ~[com.ibm.ws.runtime.jar:WAS855.SERV1 [cf141829.03]]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:853) ~[?:2.9 (07-25-2018)]
    at java.lang.J9VMInternals.prepareClassImpl(Native Method) ~[?:2.9 (07-25-2018)]
    at java.lang.J9VMInternals.prepare(J9VMInternals.java:302) ~[?:2.9 (07-25-2018)]
    at java.lang.Class.getDeclaredConstructor(Class.java:719) ~[?:2.9 (07-25-2018)]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1262) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    ... 130 more
[11/28/18 16:17:06:401 EST] 00000100 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0271E: Uncaught init() exception created by servlet [rest] in application [napolEA]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org.springframework.web.bind.annotation.support.HandlerMethodResolver
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1270)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1164)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:304)
    at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:810)
    at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:779)
    at org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:587)
    at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:444)
    at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:432)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:772)
    at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1083)
    at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1080)
    at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:64)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:109)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:73)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:398)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:355)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:882)
    at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:549)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:41010)
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
    at org.springframework.web.servlet.FrameworkServlet.jrInitWebApplicationContext(FrameworkServlet.java:40002)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    at javax.servlet.GenericServlet.init(GenericServlet.java:161)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:345)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1369)
    at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:642)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:608)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:426)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:901)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1211)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.__fireDeployedObjectStart(DeployedApplicationImpl.java:1450)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:55003)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1032)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:795)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1413)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2273)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:654)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5572)
    at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5698)
    at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:668)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:612)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1303)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:55)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012)

似乎失败的类是org.springframework.web.bind.annotation.support.HandlerMethodResolver,该版本在版本4中已弃用,在版本5中已删除,我相信... 为什么它仍要尝试拉入该文件?

1 个答案:

答案 0 :(得分:0)

at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:810)
   ~[spring-web-servlet-3.2.5.RELEASE.jar:3.2.5.RELEASE]

我在Maven Central上找不到名称为“ spring-web-servlet”的资源。类org.springframework.web.servlet.DispatcherServlet通常位于名为“ spring-webmvc”的资源中,从版本号来看,它似乎您的部署或运行​​时环境中可能有旧的spring 3.2.5 jar。