LoadListenerInitContext java.lang.ArrayIndexOutOfBoundsException问题处理方法
2019-10-12 18:18:15.327 [localhost-startStop-1] ERROR o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Exception sending context initialized event to listener instance of class [com.kxb.microservice.LoadListenerInitContext] java.lang.ArrayIndexOutOfBoundsException: 1 at com.kxb.microservice.LoadListenerInitContext.lambda$null$5(LoadListenerInitContext.java:172) at com.kxb.microservice.LoadListenerInitContext$$Lambda$22/87336235.apply(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at com.kxb.microservice.LoadListenerInitContext.lambda$initZdcodeData$6(LoadListenerInitContext.java:174) at com.kxb.microservice.LoadListenerInitContext$$Lambda$21/240252259.apply(Unknown Source) at java.util.stream.Collectors.lambda$toMap$200(Collectors.java:1321) at java.util.stream.Collectors$$Lambda$12/1714499668.accept(Unknown Source) at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at com.kxb.microservice.LoadListenerInitContext.initZdcodeData(LoadListenerInitContext.java:162) at com.kxb.microservice.LoadListenerInitContext.contextInitialized(LoadListenerInitContext.java:74) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4751) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2019-10-12 18:18:15.329 [localhost-startStop-1] ERROR org.apache.catalina.core.StandardContext - One or more listeners failed to start. Full details will be found in the appropriate container log file 2019-10-12 18:18:15.331 [localhost-startStop-1] ERROR org.apache.catalina.core.StandardContext - Context [] startup failed due to previous errors 2019-10-12 18:18:15.335 [localhost-startStop-1] WARN org.apache.catalina.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [Druid-ConnectionPool-Create-602742437] 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.park(LockSupport.java:175) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2441) 2019-10-12 18:18:15.335 [localhost-startStop-1] WARN org.apache.catalina.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [Druid-ConnectionPool-Destroy-602742437] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Thread.sleep(Native Method) com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2538) 2019-10-12 18:18:15.336 [localhost-startStop-1] WARN org.apache.catalina.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.util.TimerThread.mainLoop(Timer.java:552) java.util.TimerThread.run(Timer.java:505) 2019-10-12 18:18:15.346 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8780"] 2019-10-12 18:18:15.357 [main] INFO org.apache.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read 2019-10-12 18:18:15.383 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Pausing ProtocolHandler ["http-nio-8780"] 2019-10-12 18:18:15.435 [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat] 2019-10-12 18:18:15.438 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Stopping ProtocolHandler ["http-nio-8780"] 2019-10-12 18:18:15.443 [main] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat 2019-10-12 18:18:15.454 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed 2019-10-12 18:18:15.489 [main] INFO o.s.b.a.l.AutoConfigurationReportLoggingInitializer - Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2019-10-12 18:18:15.498 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at com.kxb.microservice.PrepositionEngineApplication.main(PrepositionEngineApplication.java:92) 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:497) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
若在启动spring boot微服务的时候出现上述错误,可以尝试修改数据库的参数group_concat_max_len的大小来解决
©️公众号:思考者文刀
- 上一篇: 阿里POLARDB集群创建常见问题
- 下一篇: windows上通过svn命令删除服务器上的分支的方法
评论
游客
回复每天顶顶贴,一身轻松啊!http://www.xwqrpmb.com
游客
回复楼主的帖子提神醒脑啊!http://wap.hgqcsy.cn