首页 最新文章网站服务器运维正文

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的大小来解决

©️公众号:思考者文刀

评论

精彩评论
  • 2024-07-08 22:37:41

    每天顶顶贴,一身轻松啊!http://www.xwqrpmb.com

  • 2024-07-08 04:18:33

    楼主的帖子提神醒脑啊!http://wap.hgqcsy.cn

百度搜索

站点信息

  • 文章总数:436
  • 页面总数:9
  • 分类总数:30
  • 标签总数:924
  • 评论总数:501
  • 浏览总数:1783899
觉得有用就打赏吧
关注本站公众号,享受更多服务!
联系方式
合作微信:itker0110
新媒体:Excel加油站(抖音/小红书/哔哩/头条)
公众号:左手Excel右手VBA
知乎:Excel其实很简单
Copyright2015-2024.Powered by ©️云水客 | 网站地图 | 辽ICP备14000512号-5
您是本站第1675名访客 今日有0篇新文章