When working, in many cases, we will define the configuration used in production, testing, development and other environments, and then reference the corresponding configuration in application.yml or properties. Occasionally, when I modify the showsql property in the configuration, I start to report an error as soon as I start the project
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281) ~[?:1.8.0_291]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339) ~[?:1.8.0_291]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[?:1.8.0_291]
at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[?:1.8.0_291]
at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:125) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:183) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:176) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:136) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.scanner.ScannerImpl.scanPlain(ScannerImpl.java:1999) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchPlain(ScannerImpl.java:1044) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:399) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:214) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:236) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:227) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:215) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:236) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:227) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:215) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:236) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:227) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:215) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:123) ~[snakeyaml-1.23.jar:?]
at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:547) ~[snakeyaml-1.23.jar:?]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:200) ~[spring-beans-5.1.19.RELEASE.jar:5.1.19.RELEASE]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:164) ~[spring-beans-5.1.19.RELEASE.jar:5.1.19.RELEASE]
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:76) ~[spring-boot-2.1.18.RELEASE.jar:2.1.18.RELEASE]
at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50) ~[spring-boot-2.1.18.RELEASE.jar:2.1.18.RELEASE]
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:544) ~[spring-boot-2.1.18.RELEASE.jar:2.1.18.RELEASE]
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:499) ~[spring-boot-2.1.18.RELEASE.jar:2.1.18.RELEASE]
... 28 more
Then, if I restart the project after rebuilding, there will still be an error. At this time, we just need to reinstall in Maven to run successfully
Read More:
- Automatic configuration of springboot and application.yml
- Error in startup after the supervisor modifies the configuration file: error: cannot open an HTTP server: socket.error reported errno.eaddnotavail
- Spring AOP uses AspectJ to report an exception that ‘the reference to the bean “mypointcut” cannot be resolved’
- Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla
- Spring cloud config does not read bootstrap.properties/yml
- java.nio.charset.MalformedInputException: Input length = 1
- Using openfeign to remotely call the startup program to report an error
- Add PageHelper spring boot starter dependency to springboot and report an error
- [Java] spring transaction control configuration error, application- persstence.xml Transaction manager report red in file
- Springboot plus cross domain annotation @crossorigin startup error
- C ා programming encountered an object reference is required for the non-static field, method, or property error
- Springboot startup error – classnotfound Exception:EnhancerBySpringCGLIB
- Pass parameters to the YML file, ansible playbook command
- Use less.js to verify and report an error in the Vue file of vscode
- Error starting ApplicationContext. To display the conditions report re-run your application with
- Vitis: platform out of date, makefile error at compile time; The modified application compiles to undefined reference
- Bash modifies the file names in the specified folder through MAC terminal (batch modification)
- org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
- Springboot startup error [extshutdown hook]
- Building Eureka_ Server error: application failed to start with classpath:file :/C:/ProgramFiles/Java/jdk