Start the project with the command Java – jar springboot.jar, and the error is as follows:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37
at java.lang.String.substring(String.java:1963)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromDirectoryEntry(JarFile.java:278)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:258)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:248)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:237)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:103)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:87)
at org.springframework.boot.loader.PropertiesLauncher.addNestedEntries(PropertiesLauncher.java:480)
at org.springframework.boot.loader.PropertiesLauncher.getClassPathArchives(PropertiesLauncher.java:418)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)
The reason is that in the spring boot project, the resources directory contains a Chinese folder, which leads to an error. Therefore, it is best to use English for the naming of folders and files in the future
Similar Posts:
- [Solved] linux Error: springboot org.springframework.context.ApplicationContextException: Failed to start bean ‘webServerStartStop’
- [Solved] java.lang.IllegalStateException: Failed to introspect Class xxxx
- java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/application-dev.yml’
- [Solved] SpringBoot1.5.10 Project Start Error: Exception in thread “main” java.lang.ClassCastException: class …
- Error reported by feign component of springcloud microservice
- org.springframework.core.log.LogMessage [How to Solve]
- [Solved] Spring Boot Error: Failed to instantiate SLF4J LoggerFactory Reported exception:
- Exception in thread “main” java.lang.ClassCastException
- [Solved] MVN – version error: Exception in thread “main” java.lang.UnsupportedClassVersionError
- [Solved] No qualifying bean of type ‘org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder’ available: