Reputation: 148
I just started to learn Spring, so I got a boiler-plate spring-boot project from https://start.spring.io/ by setting Spring-boot version to 2.0.4, Java version to 10 and added Web as dependency. I am using STS-3.9.5.RELEASE as my ide. I ran this project as a java application and this is the console output i'm getting,
2018-08-21 13:04:55.009 INFO 8352 --- [ main] com.globalmatics.bike.BikeApplication : Starting BikeApplication on LAPTOP-MO8TLAE6 with PID 8352 (D:\Education\spring-tool-suite-3.9.5.RELEASE-e4.8.0-win32-x86_64\workspace\bike\demo\target\classes started by Rajesh Raghunathan in D:\Education\spring-tool-suite-3.9.5.RELEASE-e4.8.0-win32-x86_64\workspace\bike\demo)
2018-08-21 13:04:55.014 INFO 8352 --- [ main] com.globalmatics.bike.BikeApplication : No active profile set, falling back to default profiles: default
2018-08-21 13:04:55.062 INFO 8352 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6f10d5b6: startup date [Tue Aug 21 13:04:55 IST 2018]; root of context hierarchy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/Rajesh%20Raghunathan/.m2/repository/org/springframework/spring-core/5.0.8.RELEASE/spring-core-5.0.8.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-08-21 13:04:55.938 INFO 8352 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-08-21 13:04:55.952 INFO 8352 --- [ main] com.globalmatics.bike.BikeApplication : Started BikeApplication in 1.229 seconds (JVM running for 1.598)
2018-08-21 13:04:55.955 INFO 8352 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@6f10d5b6: startup date [Tue Aug 21 13:04:55 IST 2018]; root of context hierarchy
2018-08-21 13:04:55.957 INFO 8352 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
I checked the pom and found that it has spring-boot-starter-web dependency, I know that this dependency takes care of starting tomcat server but not sure why its not working.
Edit : I downloaded the project again and ran mvn clean install command and directly ran the jar thru powershell. Still getting the same error. However, this time I noticed this console output,
[ERROR] error reading C:\Users\Rajesh Raghunathan\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.32\tomcat-embed-core-8.5.32.jar; ZipFile invalid LOC header (bad signature)
Upvotes: 0
Views: 1278
Reputation: 1938
It looks like your file tomcat-embed-core-8.5.32.jar is actually corrupted. How about trying
mvn clean install -U
to force a reload?
Upvotes: 1