Caused by: java.nio.charset.MalformedInputException: Input length = 1
- java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
- at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadIntoGroup(ConfigFileApplicationListener.java:476)
- at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:465)
- at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:386)
- at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:225)
- at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:195)
- at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:182)
- at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:168)
- 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:122)
- at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
- at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
- at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
- at com.chinanums.schoolspayment.SchoolspaymentApplication.main(SchoolspaymentApplication.java:10)
- 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)
- Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
- at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:254)
- at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:58)
- at org.yaml.snakeyaml.Yaml.loadAll(Yaml.java:518)
- at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:157)
- at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:135)
- at org.springframework.boot.env.YamlPropertySourceLoader$Processor.process(YamlPropertySourceLoader.java:101)
- at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:58)
- at org.springframework.boot.env.PropertySourcesLoader.load(PropertySourcesLoader.java:128)
- at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.doLoadIntoGroup(ConfigFileApplicationListener.java:490)
- at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadIntoGroup(ConfigFileApplicationListener.java:473)
- ... 22 common frames omitted
- Caused by: java.nio.charset.MalformedInputException: Input length = 1
- at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
- at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
- at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
- at java.io.InputStreamReader.read(InputStreamReader.java:184)
- at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:125)
- at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:223)
- ... 31 common frames omitted
第一种可能是你的application.yml文件编码格式有问题,改为UTF-8,如下:
第二种:
可能就是你的application.yml文件是通过把其他类型的文件后缀名直接改为yml生成的,这时就需要你把application.yml中的内容全部复制,然后删除,再新建一个application.yml文件,
将复制的内容拷贝进去再运行项目就不会报错了。
Caused by: java.nio.charset.MalformedInputException: Input length = 1的更多相关文章
- org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
项目启动报错2018-12-21 14:06:24.917 INFO 23472 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refr ...
- scala文件读取报错“java.nio.charset.MalformedInputException: Input length = 1”
今天写spark程序的时候遇到了一个问题就是,读取文件的时候报了一个错:“Exception in thread "main" java.nio.charset.Malformed ...
- protobuf接口调用报错:java.nio.charset.MalformedInputException: Input length = 1
使用protobuf定义的接口api发起http请求报错,日志如下: [-- ::] DEBUG AbstractPool: - server updated, node=, server={ nod ...
- windows中文编码报错 com.google.gson.JsonIOException: java.nio.charset.MalformedInputException: Input length = 1
昨天碰到一个问题:同一个请求页面,页面经过匹配后调用http的post协议接口,部署在linux环境的没问题,本地Eclipse启动的tomcat也没问题,直接启动本地tomcat却报错了: 18:4 ...
- 我的Java开发学习之旅------>Java NIO 报java.nio.charset.MalformedInputException: Input length = 1异常
今天在使用Java NIO的Channel和Buffer进行文件操作时候,报了java.nio.charset.MalformedInputException: Input length = 1异常, ...
- [bug] org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2
原因 SpringBoot启动加载yml配置文件出现编码格式错误 参考 https://www.pianshen.com/article/2431144034/
- 转载:回编译APK出错:java.nio.char set.MalformedInputException: Input length = 1
使用APKtool回编译APK,出现错误如下: Exception in thread "main" org.yaml.snakeyaml.error.YAMLExcepti ...
- mybatis 报错:Caused by: java.lang.NumberFormatException: For input string
mybatis的if标签之前总是使用是否为空,今天要用到字符串比较的时候遇到了困难,倒腾半天,才在一个论坛上找到解决方法.笔记一下,如下: 转自:https://code.google.com/p/m ...
- MyBatis报错:Caused by: java.lang.NumberFormatException: For input string: "XX"
<select id="sltTreatment" resultType="com.vitaminmd.sunny.core.bo.Treatment"& ...
随机推荐
- 码云初次导入项目(Idea)
一.新建项目 使用ssh时记得配置码云的个人中的秘钥 [问题原因] 远程仓库和本地仓库的内容不一致 [解决方法] 在git项目对应的目录位置打开Git Bash 然后在命令窗输入下面命令: gi ...
- python基础教程(2)
Python 基础教程 Python 是一种解释型.面向对象.动态数据类型的高级程序设计语言. 执行Python程序 对于大多数程序语言,第一个入门编程代码便是 "Hello World!& ...
- tetetet
http://www.wuwenhui.cn/2623.html http://www.360doc.com/content/16/1104/09/36005694_603810507.shtml
- RDP Error: The Identity Of The Remote Computer Cannot Be Verified
As i always need to remote to 20 servers at the same time, so i use a tool called Remote Desktop Con ...
- cetos7 Mysql5.7安装
centos7 MySQL安装 一.检查是否已经存在mysql,若存在卸载,避免安装时产生一些错误 rpm -qa | grep -i mysql 若存在,使用rpm -e packname –nod ...
- 基于Hexo搭建自己的博客主页
搭建自己博客分为两类,一种是托管到github上的,以hexo为代表,另一种是需要自己购买服务器,主要使用wordpress框架.有不花钱的效果也很不错,就没必要自己再购买服务器了,下边主要介绍下使用 ...
- 【Linux】一步一步学Linux——Linux系统常用快捷键(12) 待更新...
目录 00. 目录 01. Gnome下的快捷键 02. 其它 03. 参考 00. 目录 @ 参考博客:https://blog.csdn.net/dengjin20104042056/articl ...
- Eclipse 安装反编译插件 Eclipse Class Decompiler
Eclipse Class Decompiler在线安装方法 https://blog.csdn.net/tangjinquan1157/article/details/77506015 Eclips ...
- java之servlet之文件下载
1.在页面中,可以直接通过超链接来下载: a) 如果浏览器能够打开该文件,那么直接在浏览器中显示---不是想要的效果 b) 任何人都能下载,不能进行权限控制 2.通过servlet来进行下载,在ser ...
- 前端开发 Vue Vue.js和Nodejs的关系
首先vue.js 是库,不是框架,不是框架,不是框架. Vue.js 使用了基于 HTML 的模版语法,允许开发者声明式地将 DOM 绑定至底层 Vue 实例的数据. Vue.js 的核心是一个允许你 ...