Update : I tried kucing_terbang's suggestion of using spring boot v1.1.10 but now get the error as follows: I think the issue is because I don't have the right versions of Spring/Spring Boot running (perhaps it's trying to use an incorrect version of Tomcat so the method doesn't exist?) : Unable to start embedded container nested exception is : .(Lorg/apache/tomcat/JarScanFilter )VĪt .(EmbeddedWebApplicationContext.java:133) ~Īt .AbstractApplicationContext.refresh(AbstractApplicationContext.java:474) ~Īt .(EmbeddedWebApplicationContext.java:118) ~Īt .refresh(SpringApplication.java:686) Īt .run(SpringApplication.java:320) Īt .run(SpringApplication.java:957) Īt .run(SpringApplication.java:946) Īt .main(Application.java:13) Īt 0(Native Method) ~Īt (NativeMethodAccessorImpl.java:57) ~Īt (DelegatingMethodAccessorImpl.java:43) ~Īt .invoke(Method.java:606) ~Īt .n(MainMethodRunner.java:53) Īt (Thread.java:745) Ĭaused by: : .(Lorg/apache/tomcat/JarScanFilter )VĪt .$tSkipPattern(SkipPatternJarScanner.java:106) ~Īt .8SkipFilter(SkipPatternJarScanner.java:61) ~Īt .(SkipPatternJarScanner.java:56) ~Īt .(SkipPatternJarScanner.java:87) ~Īt .(TomcatEmbeddedServletContainerFactory.java:168) ~Īt .(TomcatEmbeddedServletContainerFactory.java:154) ~Īt .(EmbeddedWebApplicationContext.java:157) ~Īt .(EmbeddedWebApplicationContext.java:130) ~ When I then run the generated jar file with java -jar I get the following error: 09:17:26.946 ERROR o.s.boot.SpringApplication - Application startup failed When I copy the whole project over to my linux server, and I run maven package, the code compiles without a problem. String beanNames = ctx.getBeanDefinitionNames() ("Let's inspect the beans provided by Spring Boot:") ("NinjaSquare server up and running with Spring Boot!") Import .SpringBootApplication ĪpplicationContext ctx = n(Application.class, args) However as I want to deploy to the server I am using Spring Boot.Īpplication.java package If I run the backend in Eclipse compiling to a war (specified in Maven), and using Tomcat 7, it runs without a problem. I am currently writing an API backend using Spring which I want to deploy on to a production server using Spring Boot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |