首页 > 其他分享 >Application run failed .ParserException: while parsing a block mapping in 'reader'

Application run failed .ParserException: while parsing a block mapping in 'reader'

时间:2024-12-25 17:43:45浏览次数:1  
标签:run java snakeyaml boot mapping springframework failed yaml org

[root@ecm-8cc1 logs]# tail -f -n 1000 sys-error.log
17:26:46.060 [main] ERROR o.s.b.SpringApplication - [reportFailure,870] - Application run failed
org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
in 'reader', line 2, column 1:
jxd:
^
expected <block end>, but found '<block mapping start>'
in 'reader', line 28, column 3:
servlet:
^

at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:617)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165)
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:59)
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:45)
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:140)
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:119)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:292)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:195)
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:313)
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:304)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:288)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:195)
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:115)
at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:135)
at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.getData(OriginTrackedYamlLoader.java:103)
at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:512)
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:199)
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:166)
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:88)
at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
at org.springframework.boot.context.config.StandardConfigDataLoader.load(StandardConfigDataLoader.java:54)
at org.springframework.boot.context.config.StandardConfigDataLoader.load(StandardConfigDataLoader.java:36)
at org.springframework.boot.context.config.ConfigDataLoaders.load(ConfigDataLoaders.java:107)
at org.springframework.boot.context.config.ConfigDataImporter.load(ConfigDataImporter.java:128)
at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:86)
at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:116)
at org.springframework.boot.context.config.ConfigDataEnvironment.processInitial(ConfigDataEnvironment.java:240)
at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:227)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:102)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:94)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:102)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:87)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:171)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:133)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:379)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:337)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1370)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1359)
at com.jxd.JxdApplication.main(JxdApplication.java:25)
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.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)


解决方案: application.yml 参数属性,缩进格式有问题,要保证空2个,多一个少一个都有问题。

标签:run,java,snakeyaml,boot,mapping,springframework,failed,yaml,org
From: https://www.cnblogs.com/myibm/p/18631075

相关文章

  • nodepadd++ run python script
    原文链接:[https://www.quora.com/Can-you-run-Python-in-Notepad]Firstoption:(Easiest,recommended)OpenNotepad++.Onthemenugoto:Run->Run..(F5).Typein:C:\Python26\python.exe"$(FULL_CURRENT_PATH)"Now,insteadofpressingrun,press......
  • [转]使用matplotlib绘图,报错“This application failed to start because no Qt platf
    问题使用matplotlib绘图时,报错:ThisapplicationfailedtostartbecausenoQtplatformplugincouldbeinitialized.Reinstallingtheapplicationmayfixthisproblem.Availableplatformpluginsare:minimal,offscreen,webgl,windows.如图  解决方法:impor......
  • Helm方式部署Gitlab、Gitlab-Runner、Harbor
    Helm方式部署Gitlab、Gitlab-Runner、Harbor参考文档Runner:https://docs.gitlab.cn/runner/install/kubernetes.htmlGitlab:https://docs.gitlab.cn/charts/installation/Harbor:https://artifacthub.io/packages/helm/harbor/harbor安装gitlab这里演示使用的是国内的极狐g......
  • WSL2 ubuntu18.04 使用xfce4时Xlaunch黑屏问题以及解决,X server already running on d
    显示xfce4启动成功却没有画面显示在Ubuntu终端输入startxfce4启动X服务时,显示:/usr/bin/startxfce4:Xserveralreadyrunningondisplay10.255.255.254:0,且Xlaunch黑屏无输入。如图所示:分析原因:出现Xserveralreadyrunningondisplay10.255.255.254:0说明X服务......
  • Loadrunner12 Controller 运行时不显示具体信息可视化的表格视图 解决方案
     loadrunnercontroller点击run运行时,下方的窗口没有显示表格视图,无法实现可查看资源的实时运行情况 实际上,左侧已经显示设计场景在运行了,蓝色部分为可查看部分 解决方案:1.点击view-viewgraphs-showxxgraphs;选择需要显示几个表格形式(这里我选择4个) 2.......
  • 解决 高版本SpringBoot整合Swagger 启动报错Failed to start bean ‘documentationPlu
    解决高版本SpringBoot整合Swagger启动报错Failedtostartbean‘documentationPluginsBootstrapper‘问题|Id|Title|DateAdded|SourceUrl|PostType|Body|BlogId|Description|DateUpdated|IsMarkdown|EntryName|CreatedTime|IsActive|AutoDesc|A......
  • Esxi 使用 RDM (Raw Device Mapping) 功能直接将磁盘分配给虚拟机,直通
    如果你只想直通单个硬盘,而不是整个SATA控制器,也可以使用RDM(RawDeviceMapping)功能直接将磁盘分配给虚拟机。或者是你的控制器不支持直通,也可以用这种方法将所有的硬盘直接分配给虚拟机使用。 1、创建一个专门用来存储RDM映射文件的目录mkdir/vmfs/volumes/datast......
  • push代码报错fatal: Authentication failed的问题解决
    在不使用pat之前,我的centos系统不能向github提交代码,然后我在github上申请了pat并且配置,可以成功提交代码了,而且还免除了输入用户名和密码的麻烦。如何申请pat(咨询文心快码就可以得到答案):如何在git上配置pat(继续咨询文心快码):配置完成之后,问题得到解决,现在可以正常的push代码......
  • PbootCMS的config、data和runtime目录分别有什么作用
    PbootCMS的config、data和runtime目录各自有不同的作用:config目录:这个目录主要用于存放授权码和数据库配置文件。PbootCMS在启动时会读取这些配置文件,以连接数据库和其他系统资源。确保这个目录具有适当的写入权限,以便系统可以在需要时更新配置文件。data目录:这个目录主要用于......
  • 浅入浅出docker run命令源码3-containerd续篇
    1.前情回顾上一篇我们已经知道如何找到对应的gRPC请求接口的逻辑代码了,但是还没有看具体的代码。在最初的《浅入浅出dockerrun命令源码》中已知,启动容器还需要启动shim进程以及runc进程。但是具体是如何启动的,还不清楚。这篇文章中,主要解决问题是containerd是如何启动......