Spring boot,Eureka 服务器,IBM WAS:logback 给出 NoClassDefFoundError ch.qos.logback.classic.spi.ThrowableP

Posted

技术标签:

【中文标题】Spring boot,Eureka 服务器,IBM WAS:logback 给出 NoClassDefFoundError ch.qos.logback.classic.spi.ThrowableProxy【英文标题】:Spring boot , Eureka server , IBM WAS : logback gives NoClassDefFoundError ch.qos.logback.classic.spi.ThrowableProxy 【发布时间】:2016-12-29 06:38:37 【问题描述】:

我在使用 jdk 8 在 IBM Websphere Application server (8.5.5.9) 上启动 spring boot 应用程序 (Eureka server)( 尝试 :1.4.0 , 1.3.7 , 1.3.6 ) 时遇到问题,它抛出以下问题例外:

[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: ch.qos.logback.classic.spi.ThrowableProxy
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:433)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1178)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1383)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:972)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:777)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1380)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2191)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5486)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5612)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1270)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at java.lang.reflect.Method.invoke(Method.java:508)
[8/22/16 14:04:02:483 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at java.lang.reflect.Method.invoke(Method.java:508)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at java.security.AccessController.doPrivileged(AccessController.java:620)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.management.commands.AdminServiceCommands$InvokeCmd.execute(AdminServiceCommands.java:251)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:246)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:608)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.RequestProcessor.processActionPerform(Unknown Source)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.RequestProcessor.process(Unknown Source)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.ActionServlet.process(Unknown Source)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1385)
[8/22/16 14:04:02:484 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:194)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.RequestProcessor.doForward(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.tiles.TilesRequestProcessor.doForward(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.RequestProcessor.processForwardConfig(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.RequestProcessor.process(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.ActionServlet.process(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistance(WSCUrlFilter.java:964)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:511)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:332)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:940)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1820)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[8/22/16 14:04:02:485 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[8/22/16 14:04:02:486 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[8/22/16 14:04:02:486 GMT+02:00] 00000098 SystemErr     R   at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[8/22/16 14:04:02:486 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
[8/22/16 14:04:02:486 GMT+02:00] 00000098 SystemErr     R Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: ch.qos.logback.classic.spi.ThrowableProxy
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:914)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   ... 97 more
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: ch.qos.logback.classic.spi.ThrowableProxy
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:177)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   ... 99 more
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R Caused by: java.lang.NoClassDefFoundError: ch.qos.logback.classic.spi.ThrowableProxy
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at ch.qos.logback.classic.Logger.log(Logger.java:765)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at java.util.logging.Logger.log(Logger.java:749)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.logging.WsLogger.deliverOrBuffer(WsLogger.java:407)
[8/22/16 14:04:02:517 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.logging.WsLogger.log(WsLogger.java:385)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.logging.WsLogger.logp(WsLogger.java:639)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scanJAR(ScannerContextImpl.java:282)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scanJARs(ScannerContextImpl.java:315)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ecs.internal.scan.context.impl.WARScannerContext.scanInternal(WARScannerContext.java:76)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.scan(ScannerContextImpl.java:87)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl.getScannedClasses(ScannerContextImpl.java:70)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebAppImpl.scanForHandlesTypesClasses(WebAppImpl.java:764)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:605)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:170)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   ... 100 more
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.net.URLClassLoader.findClass(URLClassLoader.java:607)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.lang.ClassLoader.loadClass(ClassLoader.java:825)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
[8/22/16 14:04:02:518 GMT+02:00] 00000098 SystemErr     R   ... 120 more

只需在 pom 中包含 spring-cloud-starter-eureka-server ,部署到 WAS ,启动应用程序 --> 生成异常

如果你从 pom 中移除 starter 并部署应用程序,应用程序可以多次启动和停止并正常工作。

所以我不明白为什么 eureka server starter 会破坏 logback 并给出这个异常

如果有人有兴趣试一试,请附上项目demo application。

注意:部署应用程序后,停止所有服务器并启动它,应用程序启动成功,停止它并单独启动它,它再次产生异常。

我相信它与类路径加载器冲突或类似的东西有关,但我无法理解。

任何帮助!

【问题讨论】:

【参考方案1】:

感谢示例项目!

当我建立你的战争时,我看到了

$ jar tvf bootcallbackdemo-0.0.1-SNAPSHOT.war|grep logback
   521 Mon Aug 29 09:07:26 MDT 2016 WEB-INF/classes/logback-spring.xml
304075 Fri Apr 08 08:49:58 MDT 2016 WEB-INF/lib/logback-classic-1.1.7.jar
470782 Fri Apr 08 08:50:02 MDT 2016 WEB-INF/lib/logback-core-1.1.7.jar

ThrowableProxylogback-classic-1.1.7.jar 中。

不幸的是,我没有 websphere,但我猜 websphere 有一个旧版本的 logback,它不包含 ThrowableProxy,并且正在使用它而不是 WEB-INF/lib 中定义的那个。有没有可以改变优先级的设置(几年前的weblogic中有)?

【讨论】:

嗨,Spencer,是的,我最后尝试将类加载器更改为父级,但仍然是同样的问题。我也跟着猜测 jar 冲突,但我在 websphere 中找不到 logback jar,我会在下周再试一次,并用结果更新你。

以上是关于Spring boot,Eureka 服务器,IBM WAS:logback 给出 NoClassDefFoundError ch.qos.logback.classic.spi.ThrowableP的主要内容,如果未能解决你的问题,请参考以下文章

使用 Eureka 服务集成测试 Spring Boot 服务

Spring Boot 不兼容 Eureka 服务器

使用 Spring boot、Eureka、Zuul、Spring Oauth 创建 OAuth 安全微服务的问题

.net core + eureka + spring boot 服务注册与调用

spring boot 1.5.2中eureka客户端如何找到eureka server?

学习SPRING BOOT, SPRING CLOUD之Eureka和security