logback报java.lang.NoClassDefFoundError异常 5C

SpringBoot项目使用logback记录日志,项目部署在centos6.x上,运行一段时间无异常,之后从某天开始都报Exception in thread "Thread-XX" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

1个回答

是不是对应的jar包被删除了。

a814902893
stackport 没有,所有的jar都打进去了,这个问题是运行了一个月左右才出现,之前日志功能是正常的.
大约 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
linux上tomcat关闭时候项目报线程异常还有这个异常
java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1750) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) at ch.qos.logback.classic.Logger.debug(Logger.java:503) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:612) Exception in thread "SpringJobSchedulerFactoryBean_Worker-9" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/LoggingEvent at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) at ch.qos.logback.classic.Logger.debug(Logger.java:503) Dec 21, 2016 3:02:18 PM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load ch.qos.logback.classic.spi.LoggingEvent. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1750) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) at ch.qos.logback.classic.Logger.debug(Logger.java:503) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:612) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:612) Exception in thread "SpringJobSchedulerFactoryBean_Worker-7" Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.LoggingEvent at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) ... 4 more # java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/LoggingEvent**_
springboot 配置logback-spring.xml 无法引用application.yml 中的配置
![图片说明](https://img-ask.csdn.net/upload/201911/28/1574929837_608049.png)![图片说明](https://img-ask.csdn.net/upload/201911/28/1574929844_953531.png) ERROR in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@48eefed5 - maxFileSize property is mandatory. at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223) 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.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:208) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70) 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.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) at qdj.open.sdk.OpenSdkApplication.main(OpenSdkApplication.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.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)
logback日志数量修改问题
现在需要将logback的最大日志数量提高到40个,由于logback内部最大只支持20个,设置超过20后也只输出20个文件。 重写FixedWindowRollingPolicy类如下: package com.logback.test; import ch.qos.logback.core.rolling.FixedWindowRollingPolicy; public class CustomFixedWindowRollingPolicy extends FixedWindowRollingPolicy { private static int MAX_WINDOW_SIZE = 500; @Override protected int getMaxWindowSize() { return MAX_WINDOW_SIZE; } } logback.xml配置如下: <appender name="realMasterAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${log.home}/real.log</File> <rollingPolicy class="com.logback.test.CustomFixedWindowRollingPolicy"> <fileNamePattern>${log.home}/real.log.%i</fileNamePattern> <minIndex>1</minIndex> <maxIndex>100</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>40MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%date %level [%file : %line] %msg%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> </appender> 运行后后台报错如下: 17:32:44,585 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 17:32:44,632 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 17:32:44,632 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [infoAppender] 17:32:44,632 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [rollingPolicy] of type [com.logback.test.CustomFixedWindowRollingPolicy] java.lang.ClassNotFoundException: com.logback.test.CustomFixedWindowRollingPolicy at java.lang.ClassNotFoundException: com.logback.test.CustomFixedWindowRollingPolicy at at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494) at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at at java.lang.ClassLoader.loadClass(Unknown Source) at at ch.qos.logback.core.util.Loader.loadClass(Loader.java:124) at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:100) at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:275) at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:147) at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:129) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50) 求解啊!
maven jetty 环境下的Web项目在使用logback slf4j时,slf4j总是绑定java.util.logging
Logger logger = (Logger) LoggerFactory.getLogger(UserAction.class); logger.info("loginUser:username{},password{}",username,password); java.lang.ClassCastException: org.slf4j.impl.JDK14LoggerAdapter cannot be cast to ch.qos.logback.classic.Logger
STS 运行报错(sts-3.8.3.RELEASE)
Exception in thread "main" java.lang.NoClassDefFoundError: ch/qos/logback/classic/turbo/TurboFilter at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.getConstructor(Class.java:1825) at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:169) at org.springframework.boot.logging.LoggingSystem.get(LoggingSystem.java:160) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:229) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:209) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122) at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:68) at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) at com.bill.firstapplication.DemoApplication.main(DemoApplication.java:9) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.turbo.TurboFilter 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) ... 17 more
java tomcat dubbo服务关闭失败
25-Dec-2019 13:10:35.326 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance. 25-Dec-2019 13:10:35.328 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8050"] 25-Dec-2019 13:10:35.332 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8059"] 25-Dec-2019 13:10:35.333 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] 25-Dec-2019 13:10:35.384 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 25-Dec-2019 13:10:45.373 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.LoggerContext.noAppenderDefinedWarning(LoggerContext.java:186) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:264) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.debug(Logger.java:482) at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:742) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:94) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) 25-Dec-2019 13:10:45.377 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.warn(Logger.java:692) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162)
logback报错,请大家帮一下忙
```<?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <!-- 定义参数常量 --> <!-- TRACE<DEBUG<INFO<WARN<ERROR --> <property name="log.level" value="debug" /> <property name="log.maxHistory" value="30" /> <property name="log.filePath" value="${catalina.base}/logs/webapps" /> <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg %n" /> <!--控制台设置 --> <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> </encoder> </appender> <!-- DEBUG --> <appender name="debugAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>DEBUG</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <!--INFO --> <appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>INFO</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <!--ERROR --> <appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <logger name="com.imooc.o2o" level="${log.level}" additivity="true" > <appender-ref ref="debugAppender"/> <appender-ref ref="infoAppender"/> <appender-ref ref="errorAppender"/> </logger> <root level ="info"> <appender-ref ref="consoleAppender"/> </root> </configuration> ``` ``` ``` package com.imooc.o2o.web.superadmin; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.imooc.o2o.entity.Area; import com.imooc.o2o.service.AreaService; @Controller @RequestMapping("/superadmin") public class AreaController { Logger logger =LoggerFactory.getLogger(AreaController.class); @Autowired private AreaService areaService; @RequestMapping(value="/listarea",method = RequestMethod.GET) @ResponseBody private Map<String,Object> listArea(){ logger.info("===start==="); long startTime = System.currentTimeMillis(); Map<String,Object> modelMap=new HashMap<String,Object>(); List<Area> list = new ArrayList<Area>(); try { list = areaService.getAreaList(); modelMap.put("rows", list); modelMap.put("total", list.size()); }catch(Exception e) { e.printStackTrace(); modelMap.put("success",false); modelMap.put("errMsg",e.toString()); } logger.error("test error!"); long endTime = System.currentTimeMillis(); logger.debug("costTime:[{}ms]",endTime-startTime); logger.info("===end==="); return modelMap; } } 测试的时候出现这样的异常:Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception: java.lang.IllegalArgumentException: All tokens consumed but was expecting "}" at ch.qos.logback.core.subst.Parser.expectNotNull(Parser.java:143) at ch.qos.logback.core.subst.Parser.expectCurlyRight(Parser.java:148) at ch.qos.logback.core.subst.Parser.T(Parser.java:94) at ch.qos.logback.core.subst.Parser.E(Parser.java:51) at ch.qos.logback.core.subst.Parser.parse(Parser.java:47) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:46) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:112) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:157) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:90) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:289) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:172) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:82) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:157) at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:49) at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:40) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:153) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:141) at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:419) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:405) 请问一下各位这是什么原因,本人小白,完全是照着视频里面打的
logback access模块和jetty集成,启动jetty报错!!!
**官方资料:http://logback.qos.ch/access.html** **配置文件:** <Set name="handler"> <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> <Set name="handlers"> <Array type="org.eclipse.jetty.server.Handler"> <Item> <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> </Item> <Item> <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/> </Item> <!-- add a RequestLogHandler --> <Item> <New id="RequestLogHandler" class="org.eclipse.jetty.server.handler.RequestLogHandler"/> </Item> </Array> </Set> </New> </Set> <Ref id="RequestLogHandler"> <Set name="requestLog"> <New id="requestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl"> <Set name="fileName">C:\jetty\resources\logback-access.xml</Set> </New> </Set> </Ref> <Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/> <!-- initialize the Jetty MBean container --> <Get id="Container" name="container"> <Call name="addEventListener"> <Arg> <New class="org.mortbay.management.MBeanContainer"> <Arg><Ref id="MBeanServer"/></Arg> <Set name="managementPort">8082</Set> <Call name="start" /> </New> </Arg> </Call> </Get> ** logback-access.xml文件** <configuration> <!-- always a good activate OnConsoleStatusListener --> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%h %l %u %user %date "%r" %s %b</pattern> </encoder> </appender> <appender-ref ref="STDOUT" /> </configuration> **启动jetty** C:\jetty>java -jar start.jar 2015-07-24 12:03:57.286:WARN:oejx.XmlConfiguration:Config error at <Set name="re questLog">|? <New id="requestLogImpl" class="ch.qos.logback.access.jetty.Requ estLogImpl"><Set name="fileName">C:\jetty\resources\logback-access.xml</Set></Ne w>|? </Set> java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.Reque stLogImpl 2015-07-24 12:03:57.286:WARN:oejx.XmlConfiguration:Config error at <Ref id="Requ estLogHandler"><Set name="requestLog">|? <New id="requestLogImpl" class="ch.q os.logback.access.jetty.RequestLogImpl"><Set name="fileName">C:\jetty\resources\ logback-access.xml</Set></New>|? </Set></Ref> java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.RequestLogImpl java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.jetty.start.Main.invokeMain(Main.java:473) at org.eclipse.jetty.start.Main.start(Main.java:615) at org.eclipse.jetty.start.Main.main(Main.java:96) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.Request LogImpl at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClas s(XmlConfiguration.java:366) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(X mlConfiguration.java:767) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValu e(XmlConfiguration.java:1141) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(Xm lConfiguration.java:1044) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlC onfiguration.java:434) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:396) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(X mlConfiguration.java:847) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:408) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:355) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.jav a:296) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:12 62) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:119 7) ... 7 more Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information
linux系统tomcat重启报错
以下是启动是的错误信息: INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 21, 2015 4:26:24 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 21, 2015 4:26:24 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/26 config=null Jan 21, 2015 4:26:24 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 16024 ms Jan 21, 2015 4:26:28 PM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load org.springframework.core.NestedExceptionUtils. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1566) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.springframework.core.NestedRuntimeException.getMessage(NestedRuntimeException.java:67) at ch.qos.logback.classic.spi.ThrowableInformation.extractStringRep(ThrowableInformation.java:50) at ch.qos.logback.classic.spi.ThrowableInformation.<init>(ThrowableInformation.java:24) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:111) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:485) at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:479) at ch.qos.logback.classic.Logger.info(Logger.java:585) at com.xsc.lottery.task.ticket.TicketTreatmentWork$3.run(TicketTreatmentWork.java:410) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 不知道该怎么解决,请各位指点啊。。。。
myEclipse2017启动项目报错StandardContext listenerStart
想在项目中使用2017炫酷的黑色主题,然后配置上tomcat6,部署完成后就报了如下错误,之前是使用2013版本的没有问题,求大神帮忙看一下!!!小白真的很想用2017 2017-6-6 17:48:07 org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.springframework.web.context.request.RequestContextListener java.lang.ExceptionInInitializerError at org.springframework.web.context.request.RequestContextListener.<init>(RequestContextListener.java:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4220) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4779) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:778) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:761) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.commons.logging.LogFactory.HashtableImpl read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374) at java.security.AccessController.checkPermission(AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285) at java.lang.System.getProperty(System.java:650) at org.apache.commons.logging.LogFactory.createFactoryStore(LogFactory.java:320) at org.apache.commons.logging.LogFactory.<clinit>(LogFactory.java:1725) ... 34 more 2017-6-6 17:48:07 org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) 2017-6-6 17:48:07 org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart 2017-6-6 17:48:07 org.apache.catalina.core.StandardContext start SEVERE: Context [/spxt] startup failed due to previous errors 17:48:07,920 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 17:48:07,920 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:48:07,921 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/NP/NPsoftware/apache-tomcat-6.0.53/webapps/spxt/WEB-INF/classes/logback.xml] 17:48:07,922 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:48:07,922 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/C:/NP/NPsoftware/apache-tomcat-6.0.53/webapps/spxt/WEB-INF/classes/logback.xml] 17:48:07,922 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/NP/NPsoftware/apache-tomcat-6.0.53/webapps/spxt/WEB-INF/lib/export09xml-3.1.2.jar!/logback.xml] 17:48:08,137 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:48:08,145 |-INFO in ch.qos.logback.core.joran.action.DefinePropertyAction - About to instantiate property definer of type [com.thunisoft.np.fy.fygyzj.util.logback.LogbackIpGetProperty] 17:48:08,150 |-ERROR in ch.qos.logback.core.joran.action.DefinePropertyAction - Could not create an PropertyDefiner of type [com.thunisoft.np.fy.fygyzj.util.logback.LogbackIpGetProperty]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.thunisoft.np.fy.fygyzj.util.logback.LogbackIpGetProperty at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.thunisoft.np.fy.fygyzj.util.logback.LogbackIpGetProperty at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:73) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:48) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:35) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288) at at com.thunisoft.np.fy.fygyyw.servlet.SsclServlet.<clinit>(SsclServlet.java:80) at at sun.misc.Unsafe.ensureClassInitialized(Native Method) at at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25) at at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) at at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) at at java.lang.reflect.Field.getFieldAccessor(Field.java:899) at at java.lang.reflect.Field.get(Field.java:358) at at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2106) at at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1969) at at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1871) at at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:742) at at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4994) at at org.apache.catalina.core.StandardContext.start(StandardContext.java:4824) at at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803) at at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125) at at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147) at at java.security.AccessController.doPrivileged(Native Method) at at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:778) at at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) at at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080) at at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003) at at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507) at at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325) at at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069) at at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at at org.apache.catalina.core.StandardService.start(StandardService.java:525) at at org.apache.catalina.core.StandardServer.start(StandardServer.java:761) at at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at at java.lang.reflect.Method.invoke(Method.java:597) at at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.logging.LogFactory
springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行
springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行了.有没有大神帮忙分析下是什么问题. 使用的是最简单的logback配置, ``` <?xml version="1.0" encoding="UTF-8"?> <configuration debug="false"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> </layout> </appender> <root level="DEBUG"> <appender-ref ref="STDOUT" /> </root> </configuration> ``` 下面是项目启动后控制台的打印日志: 14:55:11,219 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/U:/eclipseWork/small_platform/project-demo/client/target/classes/logback.xml] 14:55:11,333 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 14:55:11,347 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 14:55:11,356 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 14:55:11,483 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead. 14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder. 14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details 14:55:11,484 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG 14:55:11,484 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 14:55:11,485 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 14:55:11,488 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@506e6d5e - Registering current configuration as safe fallback point
springboot总使用maven中的springloader热部署遇到的问题
[INFO] Scanning for projects... [INFO] [INFO] ---------------< com.bjsxt:20-spring-boot-springloader >---------------- [INFO] Building 20-spring-boot-springloader 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) > test-compile @ 20-spring-boot-springloader >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 20-spring-boot-springloader --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 20-spring-boot-springloader --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 20-spring-boot-springloader --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 20-spring-boot-springloader --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) < test-compile @ 20-spring-boot-springloader <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) @ 20-spring-boot-springloader --- [INFO] Attaching agents: [C:\Users\LiYong\.m2\repository\org\springframework\springloaded\1.2.5.RELEASE\springloaded-1.2.5.RELEASE.jar] java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:110) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:560) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:374) at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:650) at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:547) Caused by: java.lang.IllegalArgumentException at sl.org.objectweb.asm.ClassReader.<init>(Unknown Source) at sl.org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.springsource.loaded.TypeDescriptorExtractor.extract(TypeDescriptorExtractor.java:49) at org.springsource.loaded.TypeRegistry.getDescriptorFor(TypeRegistry.java:332) at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptorFor(TypeDescriptorExtractor.java:139) at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.findTypeDescriptor(TypeDescriptorExtractor.java:155) at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.walkHierarchyForCatchersAndSuperDispatchers(TypeDescriptorExtractor.java:168) at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.computeCatchersAndSuperdispatchers(TypeDescriptorExtractor.java:237) at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptor(TypeDescriptorExtractor.java:94) at org.springsource.loaded.TypeDescriptorExtractor.extract(TypeDescriptorExtractor.java:52) at org.springsource.loaded.TypeRegistry.addType(TypeRegistry.java:1090) at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:335) at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:107) ... 16 more 11�� 07, 2018 11:25:52 ���� org.springsource.loaded.agent.SpringLoadedPreProcessor preProcess ����: Unexpected problem transforming call sites java.lang.IllegalArgumentException at sl.org.objectweb.asm.ClassReader.<init>(Unknown Source) at sl.org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:344) at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:99) at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:998) at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:357) at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:107) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:560) at java.base/java.lang.ClassLoader.defineClass2(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1101) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:206) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:681) at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:562) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:611) at java.base/java.lang.Class.forName(Class.java:450) at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:851) at java.base/java.util.ServiceLoader.access$600(ServiceLoader.java:390) at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1076) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:81) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:78) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:78) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at java.base/java.lang.Class.newInstance(Class.java:560) at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:176) at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:279) at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:250) at java.base/java.util.Calendar.createCalendar(Calendar.java:1692) at java.base/java.util.Calendar.getInstance(Calendar.java:1660) at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:675) at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:619) at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:598) at ch.qos.logback.core.util.CachingDateFormatter.<init>(CachingDateFormatter.java:33) at ch.qos.logback.classic.layout.TTLLLayout.<init>(TTLLLayout.java:25) at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273) at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:179) at com.rjxy.App.main(App.java:9) Exception in thread "main" java.util.ServiceConfigurationError: sun.util.locale.provider.LocaleDataMetaInfo: Unable to load sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581) at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:853) at java.base/java.util.ServiceLoader.access$600(ServiceLoader.java:390) at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1076) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:81) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:78) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:78) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at java.base/java.lang.Class.newInstance(Class.java:560) at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:176) at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:279) at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:250) at java.base/java.util.Calendar.createCalendar(Calendar.java:1692) at java.base/java.util.Calendar.getInstance(Calendar.java:1660) at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:675) at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:619) at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:598) at ch.qos.logback.core.util.CachingDateFormatter.<init>(CachingDateFormatter.java:33) at ch.qos.logback.classic.layout.TTLLLayout.<init>(TTLLLayout.java:25) at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273) at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:179) at com.rjxy.App.main(App.java:9) Caused by: java.lang.LinkageError: loader (instance of jdk/internal/loader/ClassLoaders$PlatformClassLoader): attempted duplicate class definition for name: "sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo" at java.base/java.lang.ClassLoader.defineClass2(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1101) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:206) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:681) at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:562) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:611) at java.base/java.lang.Class.forName(Class.java:450) at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:851) ... 36 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.858 s [INFO] Finished at: 2018-11-07T23:25:52+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) on project 20-spring-boot-springloader: Could not exec java: Application finished with exit code: 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Java Spring Boot 添加 logback.xml 报错
## 这是我的项目架构 ![项目架构](https://img-ask.csdn.net/upload/201712/20/1513749374_354432.png) ### 这是我的controller package com.hatom.dashitwelve.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class IndexController { //logback private final static Logger logger = LoggerFactory.getLogger(IndexController.class); /** * 访问首页 * @return */ @RequestMapping(value = "/index") public String index(){ logger.debug("记录debug日志"); logger.info("访问了index方法"); logger.error("记录error错误日志"); return "index"; } } ### 这是我的 logback.xml <?xml version="1.0" encoding="UTF-8" ?> <configuration debug="false"> <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> <property name="LOG_HOME" value="./logs" /> <!--控制台输出--> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出 :%d 表示日期,%thread 表示线程名,%-5level 级别从左显示5个字符宽度,%msg 日志消息,%n 换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> </appender> <!--按照每天生成日志文件--> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!--日志文件输出的文件名--> <FileNamePattern>${LOG_HOME}/runtime.log.%d{yyyy-MM-dd}.log</FileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> </rollingPolicy> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出 :%d 表示日期,%thread 表示线程名,%-5level 级别从左显示5个字符宽度,%msg 日志消息,%n 换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> <!--日志文件最大的大小--> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <MaxFileSize>10MB</MaxFileSize> </triggeringPolicy> </appender> <!--日志输出级别--> <root level="INFO"> <appender_ref ref="STDOUT"/> <appender_ref ref="FILE"/> </root> </configuration> ### 控制台输出 ![图1](https://img-ask.csdn.net/upload/201712/20/1513751298_100903.png) ![图2](https://img-ask.csdn.net/upload/201712/20/1513751425_673615.png) ### 希望知情认士可以耐心解答,谢谢
springboot 项目在本地启动正常,maven打包运行包如下错误,在项目中去掉 @KafkaListener注解打包运行不会报错,怀疑是jar依赖的问题,求解!
[2019-11-25 14:53:48.299][main][KEY:] INFO- Stopping service [Tomcat] -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.499][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [logback-1] but ha s failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) java.base@11.0.3/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.503][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/java.lang.Object.wait(Native Method) java.base@11.0.3/java.util.TimerThread.mainLoop(Timer.java:553) java.base@11.0.3/java.util.TimerThread.run(Timer.java:506) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.504][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [com.alibaba.nacos .naming.client.listener] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) java.base@11.0.3/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123) java.base@11.0.3/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458) com.alibaba.nacos.client.naming.core.EventDispatcher$Notifier.run(EventDispatcher.java:114) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.508][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [com.alibaba.nacos .naming.beat.sender] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) java.base@11.0.3/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.514][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [com.alibaba.nacos .naming.beat.sender] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) java.base@11.0.3/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194) java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1177) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.525][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [com.alibaba.nacos .naming.failover] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method) java.base@11.0.3/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234) java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log] [DirectJDKLog.java:180] [2019-11-25 14:53:48.531][localhost-startStop-2][KEY:] WARN- The web application [ROOT] appears to have started a thread named [com.alibaba.nacos .naming.push.receiver] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@11.0.3/java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(Native Method) java.base@11.0.3/java.net.DualStackPlainDatagramSocketImpl.receive0(DualStackPlainDatagramSocketImpl.java:124) java.base@11.0.3/java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:181) java.base@11.0.3/java.net.DatagramSocket.receive(DatagramSocket.java:814) java.base@11.0.3/java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.j java.base@11.0.3/java.net.DatagramSocket.receive(DatagramSocket.java:814) com.alibaba.nacos.client.naming.core.PushReceiver.run(PushReceiver.java:73) java.base@11.0.3/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) java.base@11.0.3/java.util.concurrent.FutureTask.run(FutureTask.java:264) java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Scheduled java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) java.base@11.0.3/java.lang.Thread.run(Thread.java:834) -[org.apache.juli.logging.DirectJDKLog:log]
linux部署tomcat启动出问题,求大神们指教错在哪啊
2016-7-14 10:40:07 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/admin/upay/jdk1.6.0_43/jre/lib/amd64/server:/home/admin/upay/jdk1.6.0_43/jre/lib/amd64:/home/admin/upay/jdk1.6.0_43/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2016-7-14 10:40:08 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-9111 2016-7-14 10:40:08 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 556 ms 2016-7-14 10:40:08 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2016-7-14 10:40:08 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.37 2016-7-14 10:40:08 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory CMUPayBankFront 2016-7-14 10:40:08 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(/opt/mcb/bank_tomcat/webapps/CMUPayBankFront/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 10:40:08,820 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Could NOT find resource [logback.groovy] 10:40:08,820 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Could NOT find resource [logback-test.xml] 10:40:08,821 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Found resource [logback.xml] at [file:/opt/mcb/bank_tomcat/webapps/CMUPayBankFront/WEB-INF/classes/logback.xml] 10:40:08,976 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 10:40:08,987 |-INFO in ch.qos.logback.classic.joran.action.ContextNameAction - Setting logger context name as [CMUPayBankFront] 10:40:08,988 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 10:40:08,999 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 10:40:09,074 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used 10:40:09,076 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_%d{yyyy-MM-dd}_%i.log for the active file 10:40:09,079 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - The date pattern is 'yyyy-MM-dd' from file name pattern '/opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_%d{yyyy-MM-dd}_%i.log'. 10:40:09,079 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - Roll-over at midnight. 10:40:09,083 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - Setting initial period to Thu Jul 14 10:40:09 EDT 2016 10:40:09,086 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 10:40:09,130 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: /opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_2016-07-14_0.log 10:40:09,130 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [null] 10:40:09,131 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender] 10:40:09,131 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [OPERATE_FILE] 10:40:09,132 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@64:13 - no applicable action for [Encoding], current ElementPath is [[configuration][appender][Encoding]] 10:40:09,132 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 10:40:09,133 |-INFO in ch.qos.logback.core.FileAppender[OPERATE_FILE] - File property is set to [/tlqnew/ljjkfile/sndfile//CMUPayBankFront.txt] 10:40:09,133 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.huateng.log.CustomMonitorAppender] 10:40:09,134 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [OPERATE_FILE_DAILY] 10:40:09,143 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used 10:40:09,143 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /opt/mcb/upay/var/log/CMUPayBankFront_%i.log.%d{yyyyMMdd} for the active file 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - The date pattern is 'yyyyMMdd' from file name pattern '/opt/mcb/upay/var/log/CMUPayBankFront_%i.log.%d{yyyyMMdd}'. 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - Roll-over at midnight. 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - Setting initial period to Thu Jul 14 10:40:09 EDT 2016 10:40:09,201 |-INFO in com.huateng.log.CustomMonitorAppender[OPERATE_FILE_DAILY] - Active log file name: /opt/mcb/upay/var/log/CMUPayBankFront_0.log.20160714 10:40:09,201 |-INFO in com.huateng.log.CustomMonitorAppender[OPERATE_FILE_DAILY] - File property is set to [null] 10:40:09,202 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.log.LogHandleImpl] to INFO 10:40:09,202 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.log.LogHandleImpl] to false 10:40:09,202 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE] to Logger[com.huateng.log.LogHandleImpl] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.bank.logFormat.MessageLogger] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.bank.logFormat.MessageLogger] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[com.huateng.bank.logFormat.MessageLogger] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.bank.listener] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.bank.listener] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[com.huateng.bank.listener] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.activemq.transport.failover] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.apache.activemq.transport.failover] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[org.apache.activemq.transport.failover] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 10:40:09,215 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2db6235b - Registering current configuration as safe fallback point 2016-7-14 10:40:10 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2016-7-14 10:40:10 org.apache.catalina.core.StandardContext start 严重: Context [/CMUPayBankFront] startup failed due to previous errors 2016-7-14 10:40:10 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-9111 2016-7-14 10:40:10 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:9101 2016-7-14 10:40:10 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/59 config=null 2016-7-14 10:40:10 org.apache.catalina.startup.Catalina start 信息: Server startup in 2666 ms
tomcat使用一段时间后报错
tomcat使用一段时间后报错,使用大约一天后某个查询报错,重启tomcat后该查询又可继续使用,但一段时间后还是报同样的错,报错信息如下: 信息: Illegal access: this web application instance has been stopped already. Could not load sun.reflect.GeneratedMethodAccessor79. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1614) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:234) at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:136) at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:99) at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:55) at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:147) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:129) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:439) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:395) at ch.qos.logback.classic.Logger.log(Logger.java:787) at org.apache.log4j.Category.differentiatedLog(Category.java:176) at org.apache.log4j.Category.log(Category.java:286) at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.log(Log4jMLog.java:161) at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.log(Log4jMLog.java:173) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:629) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700) at org.hibernate.loader.Loader.doQuery(Loader.java:801) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.loadEntity(Loader.java:2037) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998) at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) at com.qymgr.core.MultiDataSourceDao.get(MultiDataSourceDao.java:159) at com.qymgr.report.dao.T_ab50SearchDao.ConversionByAab003(T_ab50SearchDao.java:17) at com.qymgr.report.manager.impl.T_ab50MngImpl.ConversionByAab003(T_ab50MngImpl.java:17) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy21.ConversionByAab003(Unknown Source) at com.qymgr.report.action.YLDYBCYLDKSearchAct.QuerySbkdfhphz(YLDYBCYLDKSearchAct.java:870) at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:212) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:629) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:590) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:874) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:790) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:662) 求指点!
springboot logback日志不能每天生成新的日志文件,全部日志在一个文件里?
如题:springboot+logback日志不能每天切割出新的日志文件,全部的日志在一个文件里。 logback配置如下,已经用了 SizeAndTimeBasedRollingPolicy 滚动策略,但是日志不会自动按天切分,只有在重启的时候才会重新读取当天日期,生成新的日志文件。 ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <!-- <pattern> %d - %msg%n &lt;!&ndash; 控制台打印日志文件体 时间-信息 &ndash;&gt; </pattern>--> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </layout> </appender> <!-- info日志 --> <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>DENY</onMatch> <!-- 如果命中就禁止这条日志 --> <onMismatch>ACCEPT</onMismatch> <!-- 如果没有命中就使用这条规则 --> </filter> <encoder> <!--格式化输出,%d:日期;%thread:线程名;%-5level:级别,从左显示5个字符宽度;%msg:日志消息;%n:换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <!-- 设置字符集 --> <charset>UTF-8</charset> </encoder> <!-- 滚动策略 --> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <!-- 设置info日志路径 日志文件输出的文件名--> <fileNamePattern>../logs/%d{yyyy-MM}/api-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> </appender> <!-- error日志 --> <appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> <!-- 滚动策略 --> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <!-- 设置error日志路径 --> <fileNamePattern>../logs/%d{yyyy-MM}/api-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> </appender> <!-- api访问日志 --> <appender name="apiTopicLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>INFO</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>../logs/%d{yyyy-MM}/api_topic-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> </appender> <!-- 1. 输出SQL 到控制台和文件--> <logger name="org.hibernate.SQL" additivity="false"> <level value="DEBUG"/> <!-- <appender-ref ref="fileInfoLog"/>--> <appender-ref ref="consoleLog"/> </logger> <!-- 2. 输出SQL 的参数到控制台和文件--> <logger name="org.hibernate.type.descriptor.sql.BasicBinder" additivity="false" level="TRACE"> <level value="TRACE"/> <!-- <appender-ref ref="fileInfoLog"/>--> <appender-ref ref="consoleLog"/> </logger> <logger name="apiTopic" additivity="false"> <!-- 添加appender --> <appender-ref ref="fileInfoLog"/> <appender-ref ref="apiTopicLog"/> <appender-ref ref="consoleLog"/> </logger> <!-- 设置默认日志级别为INFO --> <root level="info"> <appender-ref ref="consoleLog"/> <appender-ref ref="fileInfoLog"/> <appender-ref ref="fileErrorLog"/> </root> </configuration> ```
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
"C:\idea\IntelliJ IDEA 2019.2.4\jbr\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56203,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "E:\java\develop\javacode\spring-boot\target\classes;E:\java\develop\javacode\spring-boot\lib\javaee.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-servlet.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\javax.websocket-api.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-glassfish-cdi.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-server.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-client.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-spi.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-container-grizzly.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-core.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.27\tyrus-websocket-core.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter\2.0.1.RELEASE\spring-boot-starter-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot\2.0.1.RELEASE\spring-boot-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-context\5.0.5.RELEASE\spring-context-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-autoconfigure\2.0.1.RELEASE\spring-boot-autoconfigure-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-logging\2.0.1.RELEASE\spring-boot-starter-logging-2.0.1.RELEASE.jar;E:\maven\maven_repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\maven\maven_repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\maven\maven_repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;E:\maven\maven_repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;E:\maven\maven_repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\maven\maven_repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\maven\maven_repository\org\springframework\spring-core\5.0.5.RELEASE\spring-core-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-jcl\5.0.5.RELEASE\spring-jcl-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-web\2.0.1.RELEASE\spring-boot-starter-web-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-json\2.0.1.RELEASE\spring-boot-starter-json-2.0.1.RELEASE.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-databind\2.9.5\jackson-databind-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\maven\maven_repository\com\fasterxml\jackson\core\jackson-core\2.9.5\jackson-core-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.5\jackson-datatype-jdk8-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.5\jackson-datatype-jsr310-2.9.5.jar;E:\maven\maven_repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.5\jackson-module-parameter-names-2.9.5.jar;E:\maven\maven_repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.1.RELEASE\spring-boot-starter-tomcat-2.0.1.RELEASE.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.29\tomcat-embed-core-8.5.29.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.29\tomcat-embed-el-8.5.29.jar;E:\maven\maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.29\tomcat-embed-websocket-8.5.29.jar;E:\maven\maven_repository\org\hibernate\validator\hibernate-validator\6.0.9.Final\hibernate-validator-6.0.9.Final.jar;E:\maven\maven_repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\maven\maven_repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;E:\maven\maven_repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\maven\maven_repository\org\springframework\spring-web\5.0.5.RELEASE\spring-web-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-beans\5.0.5.RELEASE\spring-beans-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-webmvc\5.0.5.RELEASE\spring-webmvc-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-aop\5.0.5.RELEASE\spring-aop-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\springframework\spring-expression\5.0.5.RELEASE\spring-expression-5.0.5.RELEASE.jar;E:\maven\maven_repository\org\mybatis\generator\mybatis-generator-core\1.3.5\mybatis-generator-core-1.3.5.jar;E:\maven\maven_repository\mysql\mysql-connector-java\8.0.11\mysql-connector-java-8.0.11.jar;E:\maven\maven_repository\com\google\protobuf\protobuf-java\2.6.0\protobuf-java-2.6.0.jar;E:\maven\maven_repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\idea\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar" com.aipuer.springboot.Application Connected to the target VM, address: '127.0.0.1:56203', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.1.RELEASE) 2019-12-02 11:09:39.252 INFO 8852 --- [ main] com.aipuer.springboot.Application : Starting Application on PC-20191121IKBV with PID 8852 (E:\java\develop\javacode\spring-boot\target\classes started by Administrator in E:\java\develop\javacode\spring-boot) 2019-12-02 11:09:39.254 INFO 8852 --- [ main] com.aipuer.springboot.Application : No active profile set, falling back to default profiles: default 2019-12-02 11:09:39.281 INFO 8852 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@78641d23: startup date [Mon Dec 02 11:09:39 CST 2019]; root of context hierarchy WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/E:/maven/maven_repository/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2019-12-02 11:09:39.917 INFO 8852 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2019-12-02 11:09:39.932 INFO 8852 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-12-02 11:09:39.932 INFO 8852 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.29 2019-12-02 11:09:39.936 INFO 8852 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\idea\IntelliJ IDEA 2019.2.4\jbr\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\app\Administrator\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;E:\java\development\jdk8\bin;E:\java\development\jdk8\jre\bin;E:\java\development\apache-maven-3.3.9-bin\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin\;C:\Program Files\nodejs\;E:\java\svn\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\Administrator\AppData\Roaming\npm;.] 2019-12-02 11:09:39.981 ERROR 8852 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5125) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 8 common frames omitted Caused by: java.lang.NoSuchMethodError: 'java.lang.String javax.servlet.ServletContext.getVirtualServerName()' at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1186) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 10 common frames omitted 2019-12-02 11:09:39.982 ERROR 8852 --- [ main] org.apache.catalina.core.ContainerBase : A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at com.aipuer.springboot.Application.main(Application.java:9) ~[classes/:na] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 6 common frames omitted 2019-12-02 11:09:39.982 INFO 8852 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2019-12-02 11:09:39.983 WARN 8852 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat 2019-12-02 11:09:39.987 INFO 8852 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-12-02 11:09:39.990 ERROR 8852 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at com.aipuer.springboot.Application.main(Application.java:9) ~[classes/:na] Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] ... 8 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE] ... 13 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 15 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 17 common frames omitted Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29] ... 19 common frames omitted Disconnected from the target VM, address: '127.0.0.1:56203', transport: 'socket' Process finished with exit code 1
spring-boot:run启动失败,请帮忙,谢谢!!!
POM配置文件: ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.yss</groupId> <artifactId>springBoot</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>springBoot Maven Webapp</name> <url>http://maven.apache.org</url> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.8.RELEASE</version> </parent> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> <!-- 设置编译环境 --> <build> <finalName>springBoot</finalName> <!--设置插件 --> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!--设置JDK版本 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> </configuration> </plugin> <!--設置資源文件編碼 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build> </project> ``` 控制台报错信息: ``` [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building springBoot Maven Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) > test-compile @ springBoot >>> [WARNING] The POM for ch.qos.logback:logback-classic:jar:1.1.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.hibernate:hibernate-validator:jar:5.3.5.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ springBoot --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory E:\workspace\eclipse\springboot\src\main\resources [INFO] skip non existing resourceDirectory E:\workspace\eclipse\springboot\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ springBoot --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ springBoot --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory E:\workspace\eclipse\springboot\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ springBoot --- [INFO] No sources to compile [INFO] [INFO] <<< spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) < test-compile @ springBoot <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) @ springBoot --- Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273) at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:179) at com.liangsw.springboot.application.App.main(App.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.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.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:527) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 15 more [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.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.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:527) at java.lang.Thread.run (Thread.java:748) Caused by: java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException at org.slf4j.LoggerFactory.bind (LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization (LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory (LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger (LoggerFactory.java:357) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance (SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance (SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog (LogFactory.java:273) at org.springframework.boot.SpringApplication.<clinit> (SpringApplication.java:179) at com.liangsw.springboot.application.App.main (App.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.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.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:527) at java.lang.Thread.run (Thread.java:748) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.joran.spi.JoranException at java.net.URLClassLoader.findClass (URLClassLoader.java:381) at java.lang.ClassLoader.loadClass (ClassLoader.java:424) at java.lang.ClassLoader.loadClass (ClassLoader.java:357) at org.slf4j.LoggerFactory.bind (LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization (LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory (LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger (LoggerFactory.java:357) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance (SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance (SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog (LogFactory.java:273) at org.springframework.boot.SpringApplication.<clinit> (SpringApplication.java:179) at com.liangsw.springboot.application.App.main (App.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.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.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:527) at java.lang.Thread.run (Thread.java:748) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.154 s [INFO] Finished at: 2017-11-22T13:59:04+08:00 [INFO] Final Memory: 20M/307M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) on project springBoot: An exception occurred while running. null: InvocationTargetException: ch/qos/logback/core/joran/spi/JoranException: ch.qos.logback.core.joran.spi.JoranException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException ```
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
漫话:什么是平衡(AVL)树?这应该是把AVL树讲的最好的文章了
这篇文章通过对话的形式,由浅入深带你读懂 AVL 树,看完让你保证理解 AVL 树的各种操作,如果觉得不错,别吝啬你的赞哦。 1、若它的左子树不为空,则左子树上所有的节点值都小于它的根节点值。 2、若它的右子树不为空,则右子树上所有的节点值均大于它的根节点值。 3、它的左右子树也分别可以充当为二叉查找树。 例如: 例如,我现在想要查找数值为14的节点。由于二叉查找树的特性,我们可...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
开源并不是你认为的那些事
点击上方蓝字 关注我们开源之道导读所以 ————想要理清开源是什么?先要厘清开源不是什么,名正言顺是句中国的古代成语,概念本身的理解非常之重要。大部分生物多样性的起源,...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
《C++ Primer》学习笔记(六):C++模块设计——函数
专栏C++学习笔记 《C++ Primer》学习笔记/习题答案 总目录 https://blog.csdn.net/TeFuirnever/article/details/100700212 —————————————————————————————————————————————————————— 《C++ Primer》习题参考答案:第6章 - C++模块设计——函数 文章目录专栏C+...
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法不过,当我看了源代码之后这程序不到50
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
相关热词 c#委托 逆变与协变 c#新建一个项目 c#获取dll文件路径 c#子窗体调用主窗体事件 c# 拷贝目录 c# 调用cef 网页填表c#源代码 c#部署端口监听项目、 c#接口中的属性使用方法 c# 昨天
立即提问