I want to deploy my springboot rest api to Heroku, I have connected my github and heroku, after I pushed my change to github. Heroku can build successfully, but when I open the application on Heroku, I got the following errors
2020-04-20T03:58:24.636881+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.636881+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.636881+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.636881+00:00 app[web.1]: at com.doggydoggy.DoggyDoggyApplication.main(DoggyDoggyApplication.java:12) [classes!/:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.636881+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.636882+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.636882+00:00 app[web.1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.636882+00:00 app[web.1]: at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.636882+00:00 app[web.1]: at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.636882+00:00 app[web.1]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.636883+00:00 app[web.1]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.636883+00:00 app[web.1]: at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.636883+00:00 app[web.1]: Caused by: javax.servlet.ServletException: java.lang.IllegalStateException:
2020-04-20T03:58:24.636883+00:00 app[web.1]:
2020-04-20T03:58:24.636883+00:00 app[web.1]: ======================================================================================================
2020-04-20T03:58:24.636884+00:00 app[web.1]: Vaadin requires node.js & npm to be installed. Please install the latest LTS version of node.js (with npm) either by:
2020-04-20T03:58:24.636884+00:00 app[web.1]: 1) following the https://nodejs.org/en/download/ guide to install it globally. This is the recommended way.
2020-04-20T03:58:24.636884+00:00 app[web.1]: 2) running the following Maven plugin goal to install it in this project:
2020-04-20T03:58:24.636884+00:00 app[web.1]: $ mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion="v12.14.0"
2020-04-20T03:58:24.636885+00:00 app[web.1]:
2020-04-20T03:58:24.636895+00:00 app[web.1]: Note that in case you don't install it globally, you'll need to install it again for another Vaadin project.
2020-04-20T03:58:24.636895+00:00 app[web.1]: In case you have just installed node.js globally, it was not discovered, so you need to restart your system to get the path variables updated.
2020-04-20T03:58:24.636896+00:00 app[web.1]: ======================================================================================================
2020-04-20T03:58:24.636896+00:00 app[web.1]:
2020-04-20T03:58:24.636896+00:00 app[web.1]: at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:301) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636896+00:00 app[web.1]: at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:344) ~[vaadin-spring-12.1.2.jar!/:na]
2020-04-20T03:58:24.636897+00:00 app[web.1]: ... 46 common frames omitted
2020-04-20T03:58:24.636898+00:00 app[web.1]: Caused by: java.lang.IllegalStateException:
2020-04-20T03:58:24.636898+00:00 app[web.1]:
2020-04-20T03:58:24.636898+00:00 app[web.1]: ======================================================================================================
2020-04-20T03:58:24.636899+00:00 app[web.1]: Vaadin requires node.js & npm to be installed. Please install the latest LTS version of node.js (with npm) either by:
2020-04-20T03:58:24.636899+00:00 app[web.1]: 1) following the https://nodejs.org/en/download/ guide to install it globally. This is the recommended way.
2020-04-20T03:58:24.636906+00:00 app[web.1]: 2) running the following Maven plugin goal to install it in this project:
2020-04-20T03:58:24.636906+00:00 app[web.1]: $ mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion="v12.14.0"
2020-04-20T03:58:24.636906+00:00 app[web.1]:
2020-04-20T03:58:24.636907+00:00 app[web.1]: Note that in case you don't install it globally, you'll need to install it again for another Vaadin project.
2020-04-20T03:58:24.636907+00:00 app[web.1]: In case you have just installed node.js globally, it was not discovered, so you need to restart your system to get the path variables updated.
2020-04-20T03:58:24.636907+00:00 app[web.1]: ======================================================================================================
2020-04-20T03:58:24.636907+00:00 app[web.1]:
2020-04-20T03:58:24.636908+00:00 app[web.1]: at com.vaadin.flow.server.frontend.FrontendUtils.getExecutable(FrontendUtils.java:371) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636908+00:00 app[web.1]: at com.vaadin.flow.server.frontend.FrontendUtils.getNodeExecutable(FrontendUtils.java:300) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636908+00:00 app[web.1]: at com.vaadin.flow.server.frontend.FrontendUtils.validateNodeAndNpmVersion(FrontendUtils.java:623) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636908+00:00 app[web.1]: at com.vaadin.flow.server.DevModeHandler.<init>(DevModeHandler.java:139) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636909+00:00 app[web.1]: at com.vaadin.flow.server.DevModeHandler.createInstance(DevModeHandler.java:299) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636909+00:00 app[web.1]: at com.vaadin.flow.server.DevModeHandler.start(DevModeHandler.java:249) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636909+00:00 app[web.1]: at com.vaadin.flow.server.DevModeHandler.start(DevModeHandler.java:226) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636910+00:00 app[web.1]: at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:297) ~[flow-server-2.1.5.jar!/:2.1.5]
2020-04-20T03:58:24.636910+00:00 app[web.1]: ... 47 common frames omitted
2020-04-20T03:58:24.636910+00:00 app[web.1]:
2020-04-20T03:58:24.663094+00:00 app[web.1]: 2020-04-20 03:58:24.662 ERROR 4 --- [ main] o.apache.catalina.core.StandardContext : One or more listeners failed to start. Full details will be found in the appropriate container log file
2020-04-20T03:58:24.663714+00:00 app[web.1]: 2020-04-20 03:58:24.663 ERROR 4 --- [ main] o.apache.catalina.core.StandardContext : Context [] startup failed due to previous errors
2020-04-20T03:58:24.667161+00:00 app[web.1]: 2020-04-20 03:58:24.667 WARN 4 --- [ main] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [Thread-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
2020-04-20T03:58:24.667162+00:00 app[web.1]: java.net.PlainSocketImpl.socketAccept(Native Method)
2020-04-20T03:58:24.667162+00:00 app[web.1]: java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
2020-04-20T03:58:24.667162+00:00 app[web.1]: java.net.ServerSocket.implAccept(ServerSocket.java:560)
2020-04-20T03:58:24.667163+00:00 app[web.1]: java.net.ServerSocket.accept(ServerSocket.java:528)
2020-04-20T03:58:24.667163+00:00 app[web.1]: com.vaadin.flow.server.DevServerWatchDog$WatchDogServer.run(DevServerWatchDog.java:58)
2020-04-20T03:58:24.667164+00:00 app[web.1]: java.lang.Thread.run(Thread.java:748)
2020-04-20T03:58:24.696178+00:00 app[web.1]: 2020-04-20 03:58:24.695 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-04-20T03:58:24.703061+00:00 app[web.1]: 2020-04-20 03:58:24.702 WARN 4 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2020-04-20T03:58:24.714248+00:00 app[web.1]: 2020-04-20 03:58:24.714 INFO 4 --- [ main] org.mongodb.driver.connection : Closed connection [connectionId{localValue:2, serverValue:586888}] to ds111598.mlab.com:11598 because the pool has been closed.
2020-04-20T03:58:24.729224+00:00 app[web.1]: 2020-04-20 03:58:24.729 INFO 4 --- [ main] ConditionEvaluationReportLoggingListener :
2020-04-20T03:58:24.729226+00:00 app[web.1]:
2020-04-20T03:58:24.729227+00:00 app[web.1]: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-20T03:58:24.732562+00:00 app[web.1]: 2020-04-20 03:58:24.732 ERROR 4 --- [ main] o.s.boot.SpringApplication : Application run failed
2020-04-20T03:58:24.732562+00:00 app[web.1]:
2020-04-20T03:58:24.732563+00:00 app[web.1]: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2020-04-20T03:58:24.732584+00:00 app[web.1]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732592+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.3.RELEASE.jar!/:5.2.3.RELEASE]
2020-04-20T03:58:24.732593+00:00 app[web.1]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732601+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732602+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732602+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732603+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732603+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732604+00:00 app[web.1]: at com.doggydoggy.DoggyDoggyApplication.main(DoggyDoggyApplication.java:12) [classes!/:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.732604+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.732605+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.732605+00:00 app[web.1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.732606+00:00 app[web.1]: at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_242-heroku]
2020-04-20T03:58:24.732606+00:00 app[web.1]: at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.732606+00:00 app[web.1]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.732607+00:00 app[web.1]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.732607+00:00 app[web.1]: at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [DoggyDoggyUsers-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-04-20T03:58:24.732607+00:00 app[web.1]: Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2020-04-20T03:58:24.732608+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732608+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732609+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732609+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732610+00:00 app[web.1]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732610+00:00 app[web.1]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732611+00:00 app[web.1]: ... 16 common frames omitted
2020-04-20T03:58:24.732611+00:00 app[web.1]: Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
2020-04-20T03:58:24.732611+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:171) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732618+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:110) ~[spring-boot-2.2.4.RELEASE.jar!/:2.2.4.RELEASE]
2020-04-20T03:58:24.732618+00:00 app[web.1]: ... 21 common frames omitted
2020-04-20T03:58:24.732619+00:00 app[web.1]:
2020-04-20T03:58:25.134818+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-20T04:00:36.584773+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=quantum-vaping-back.herokuapp.com request_id=a66b761b-c882-44b5-a6fe-6ac680d49354 fwd="99.228.194.163" dyno= connect= service= status=503 bytes= protocol=https
2020-04-20T04:00:36.957827+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=quantum-vaping-back.herokuapp.com request_id=042770ee-6911-45b1-83b2-5fa007819207 fwd="99.228.194.163" dyno= connect= service= status=503 bytes= protocol=https
Here is my pom.xml file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.doggydoggy.users</groupId>
<artifactId>DoggyDoggyUsers</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>DoggyDoggyUsers</name>
<description>Doggy Doggy backend user service</description>
<properties>
<java.version>1.8</java.version>
<vaadin.version>14.1.17</vaadin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>17.12.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.heroku</groupId>
<artifactId>webapp-runner</artifactId>
<version>9.0.30.0</version>
<destFileName>webapp-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
The project works fine locally, but always get the same error once I deployed to Heroku. Please help
I had the same problem, my error was in the Procfile file. Try to add
web: java -jar target/[your-jar-file-name].jar --server.port=$PORT
and then run in command line:
git push heroku master
I hope this help you,
regards
Related
I just Created this file from spring.initializer.
It is a brand new file. I am trying to run this because I have a previous project that have similar type of error. So I thought of making a new project and see if any error comes. below i the Error
My Error
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.3)
2022-09-08 20:15:36.021 INFO 8344 --- [ main] c.m.w.webproject.WebProjectApplication : Starting WebProjectApplication using Java 17.0.4 on DESKTOP-4LDNK11 with PID 8344 (C:\Users\Lenovo\Documents\JAVA\WebProject\target\classes started by Lenovo in C:\Users\Lenovo\Documents\JAVA\WebProject)
2022-09-08 20:15:36.027 INFO 8344 --- [ main] c.m.w.webproject.WebProjectApplication : No active profile set, falling back to 1 default profile: "default"
2022-09-08 20:15:37.266 INFO 8344 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-09-08 20:15:37.297 INFO 8344 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11 ms. Found 0 JPA repository interfaces.
2022-09-08 20:15:38.269 INFO 8344 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-09-08 20:15:38.283 INFO 8344 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-09-08 20:15:38.284 INFO 8344 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-09-08 20:15:38.489 INFO 8344 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-09-08 20:15:38.490 INFO 8344 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2328 ms
2022-09-08 20:15:38.732 WARN 8344 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/boot/model/naming/CamelCaseToUnderscoresNamingStrategy
2022-09-08 20:15:38.737 INFO 8344 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-09-08 20:15:38.755 INFO 8344 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-09-08 20:15:38.789 ERROR 8344 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/boot/model/naming/CamelCaseToUnderscoresNamingStrategy
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
at com.mandeep.web.webproject.WebProjectApplication.main(WebProjectApplication.java:10) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/boot/model/naming/CamelCaseToUnderscoresNamingStrategy
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.22.jar:5.3.22]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.22.jar:5.3.22]
... 19 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/hibernate/boot/model/naming/CamelCaseToUnderscoresNamingStrategy
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties$Naming.lambda$applyNamingStrategies$1(HibernateProperties.java:178) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties$Naming.lambda$applyNamingStrategy$2(HibernateProperties.java:187) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220) ~[na:na]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties$Naming.applyNamingStrategy(HibernateProperties.java:187) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties$Naming.applyNamingStrategies(HibernateProperties.java:177) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties$Naming.access$000(HibernateProperties.java:146) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:102) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:95) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:132) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:132) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.22.jar:5.3.22]
... 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
... 35 common frames omitted
Process finished with exit code 1
My POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.mandeep.web.webproject</groupId>
<artifactId>WebProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>WebProject</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
My properties file
spring.datasource.url=jdbc:mysql://localhost:3306/WebProject
spring.datasource.username=root
spring.datasource.password=Sciman$#2569
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
connection.pool.initialPoolSize=1
connection.pool.minPoolSize=1
connection.pool.maxPoolSize=20
connection.pool.maxIdleTime=3000
My Application File
package com.mandeep.web.webproject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class WebProjectApplication {
public static void main(String[] args) {
SpringApplication.run(WebProjectApplication.class, args);
}
}
I See this
java.lang.NoClassDefFoundError: org/hibernate/boot/model/naming/CamelCaseToUnderscoresNamingStrategy
Caused by: java.lang.ClassNotFoundException: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
Couple of solutions
Check if you have this class CamelCaseToUnderscoresNamingStrategy under your Maven dependencies -> org.hibernate dependency -> path boot/model/naming
If you can't locate that class, add a hibernate dependency with version >= 5.5.4
Check if this article helps Spring boot application and hibernate are using different naming strategies
I deleted the Hibernate folder from C:\Users{User}.m2\repository.
Then I added below dependency in the pom file.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.5.4.Final</version>
</dependency>
Also add version to maven plugin -:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
**<version>${project.parent.version}</version>**
</plugin>
Do the above steps if anyone gets the same Error.
I'm trying to run a Talend job from Java code!
I followed the instructions from https://help.talend.com/reader/Lod~TDRaNw2L2VZKV9XgZw/ty4l9kEdDoVHlHIAOW1e~Q
and it works perfectly when i run it, but i can't deploy it on heroku
my code :
package com.example.demo;
import local_project.addcase_0_1.addCase;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
#SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
#RestController
class HelloController {
#GetMapping("/")
public String TestJob() {
addCase a = new addCase();
a.runJob(new String[] {});
return "Added";
}
}
errors while deploying in heroku
remote: [INFO] 3 errors
remote: [INFO] -------------------------------------------------------------
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 11.171 s
remote: [INFO] Finished at: 2020-04-28T13:19:02Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project demo: Compilation failure: Compilation failure:
remote: [ERROR] /tmp/build_555cf666918f4cc22848d177306270f3/src/main/java/com/example/demo/DemoApplication.java:[2,33] package local_project.addcase_0_1 does not exist
remote: [ERROR] /tmp/build_555cf666918f4cc22848d177306270f3/src/main/java/com/example/demo/DemoApplication.java:[22,17] cannot find symbol
remote: [ERROR] symbol: class addCase
remote: [ERROR] location: class com.example.demo.HelloController
remote: [ERROR] /tmp/build_555cf666918f4cc22848d177306270f3/src/main/java/com/example/demo/DemoApplication.java:[22,33] cannot find symbol
remote: [ERROR] symbol: class addCase
remote: [ERROR] location: class com.example.demo.HelloController
remote: [ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
remote:
remote: ! ERROR: Failed to build app with Maven
remote: We're sorry this build is failing! If you can't find the issue in application code,
remote: please submit a ticket so we can help: https://help.heroku.com/
remote:
remote: ! Push rejected, failed to compile Java app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to excel-to-case.
remote:
To https://git.heroku.com/excel-to-case.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/excel-to-case.git'
my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>testSAV</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>testSAV</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>addcase_0_1</groupId>
<artifactId>addcase_0_1</artifactId>
<!-- <scope>system</scope> -->
<version>1.0</version>
<!-- <systemPath>${basedir}/lib/routines.jar</systemPath> -->
</dependency>
<dependency>
<groupId>routines</groupId>
<artifactId>routines</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${basedir}/lib/routines.jar</systemPath>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
the error now is in the import local_project.addcase_0_1.addCase;
heroku logs :
2020-05-03T15:37:49.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/457ad836-1540-41de-9249-bfcbbd84b49b/activity/builds/49b7bd2b-ef75-4406-85e1-70a86abb641c
2020-05-03T15:59:17.000000+00:00 app[api]: Build started by user mehdi1.chelly1#gmail.com
2020-05-03T15:59:27.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/457ad836-1540-41de-9249-bfcbbd84b49b/activity/builds/c1e3e0cc-7298-4b04-90e7-8002db7a8f87
2020-05-03T16:03:20.907668+00:00 heroku[web.1]: Idling
2020-05-03T16:03:20.976991+00:00 heroku[web.1]: State changed from up to down
2020-05-03T16:03:22.085249+00:00 app[web.1]: 2020-05-03 16:03:22.084 INFO 4 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-05-06T16:29:02.123057+00:00 heroku[web.1]: Unidling
2020-05-06T16:29:02.417880+00:00 heroku[web.1]: State changed from down to starting
2020-05-06T16:29:08.513593+00:00 app[web.1]: Create a Procfile to customize the command used to run this process: https://devcenter.heroku.com/articles/procfile
2020-05-06T16:29:08.538367+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2020-05-06T16:29:08.541678+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2020-05-06T16:29:09.835908+00:00 app[web.1]:
2020-05-06T16:29:09.836021+00:00 app[web.1]: . ____ _ __ _ _
2020-05-06T16:29:09.836101+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2020-05-06T16:29:09.836227+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2020-05-06T16:29:09.836307+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2020-05-06T16:29:09.836385+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2020-05-06T16:29:09.836466+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2020-05-06T16:29:09.837993+00:00 app[web.1]: :: Spring Boot :: (v2.2.6.RELEASE)
2020-05-06T16:29:09.838046+00:00 app[web.1]:
2020-05-06T16:29:10.022882+00:00 app[web.1]: 2020-05-06 16:29:10.018 INFO 4 --- [ main] com.example.demo.TestSavApplication : Starting TestSavApplication v0.0.1-SNAPSHOT on c0b428f8-64b5-428d-82c0-8bdce4b7b727 with PID 4 (/app/target/testSAV-0.0.1-SNAPSHOT.jar started by u58099 in /app)
2020-05-06T16:29:10.024061+00:00 app[web.1]: 2020-05-06 16:29:10.023 INFO 4 --- [ main] com.example.demo.TestSavApplication : No active profile set, falling back to default profiles: default
2020-05-06T16:29:11.171979+00:00 app[web.1]: 2020-05-06 16:29:11.171 INFO 4 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$92f6743f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-06T16:29:11.248661+00:00 app[web.1]: 2020-05-06 16:29:11.248 INFO 4 --- [ main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2020-05-06T16:29:11.610473+00:00 app[web.1]: 2020-05-06 16:29:11.610 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 4317 (http)
2020-05-06T16:29:11.625982+00:00 app[web.1]: 2020-05-06 16:29:11.625 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-06T16:29:11.626341+00:00 app[web.1]: 2020-05-06 16:29:11.626 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.33]
2020-05-06T16:29:11.705303+00:00 app[web.1]: 2020-05-06 16:29:11.705 INFO 4 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-06T16:29:11.705419+00:00 app[web.1]: 2020-05-06 16:29:11.705 INFO 4 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1591 ms
2020-05-06T16:29:11.948140+00:00 app[web.1]: 2020-05-06 16:29:11.947 INFO 4 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-06T16:29:12.103743+00:00 app[web.1]: 2020-05-06 16:29:12.103 WARN 4 --- [ main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2020-05-06T16:29:12.333886+00:00 heroku[web.1]: State changed from starting to up
2020-05-06T16:29:12.213018+00:00 app[web.1]: 2020-05-06 16:29:12.212 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 4317 (http) with context path ''
2020-05-06T16:29:12.216246+00:00 app[web.1]: 2020-05-06 16:29:12.216 INFO 4 --- [ main] com.example.demo.TestSavApplication : Started TestSavApplication in 2.936 seconds (JVM running for 3.674)
2020-05-06T16:29:14.643462+00:00 app[web.1]: 2020-05-06 16:29:14.643 INFO 4 --- [nio-4317-exec-3] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-05-06T16:29:14.643574+00:00 app[web.1]: 2020-05-06 16:29:14.643 INFO 4 --- [nio-4317-exec-3] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-05-06T16:29:14.651667+00:00 app[web.1]: 2020-05-06 16:29:14.651 INFO 4 --- [nio-4317-exec-3] o.s.web.servlet.DispatcherServlet : Completed initialization in 8 ms
2020-05-06T16:29:14.830783+00:00 heroku[router]: at=info method=GET path="/" host=excel-to-case.herokuapp.com request_id=04b8f867-b4f7-4817-ab4f-f872d2ed3395 fwd="197.27.207.239" dyno=web.1 connect=0ms service=220ms status=404 bytes=553 protocol=https
2020-05-06T16:29:15.071769+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=excel-to-case.herokuapp.com request_id=8cf42e29-ed3d-4cbe-a48d-bd26970e7146 fwd="197.27.207.239" dyno=web.1 connect=0ms service=95ms status=404 bytes=365 protocol=https
2020-05-06T16:29:22.120185+00:00 app[web.1]: 2020-05-06 16:29:22.119 ERROR 4 --- [nio-4317-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: local_project/addcase_0_1/addCase] with root cause2020-05-06T16:29:22.120195+00:00 app[web.1]:
2020-05-06T16:29:22.120196+00:00 app[web.1]: java.lang.ClassNotFoundException: local_project.addcase_0_1.addCase
2020-05-06T16:29:22.120197+00:00 app[web.1]: at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120197+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120198+00:00 app[web.1]: at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:92) ~[testSAV-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2020-05-06T16:29:22.120198+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120199+00:00 app[web.1]: at com.example.demo.ExcelToCase2.TestJob(TestSavApplication.java:42) ~[classes!/:0.0.1-SNAPSHOT]
2020-05-06T16:29:22.120199+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120200+00:00 app[web.1]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120201+00:00 app[web.1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120201+00:00 app[web.1]: at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_252-heroku]
2020-05-06T16:29:22.120201+00:00 app[web.1]: at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120202+00:00 app[web.1]: at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120204+00:00 app[web.1]: at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120204+00:00 app[web.1]: at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]2020-05-06T16:29:22.120205+00:00 app[web.1]: at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120205+00:00 app[web.1]: at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120206+00:00 app[web.1]: at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120209+00:00 app[web.1]: at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120209+00:00 app[web.1]: at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120209+00:00 app[web.1]: at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120210+00:00 app[web.1]: at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120210+00:00 app[web.1]: at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120211+00:00 app[web.1]: at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120211+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120212+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120212+00:00 app[web.1]: at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120212+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120213+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120213+00:00 app[web.1]: at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120221+00:00 app[web.1]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120222+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120222+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120223+00:00 app[web.1]: at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120223+00:00 app[web.1]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120223+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120224+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120224+00:00 app[web.1]: at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120225+00:00 app[web.1]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
2020-05-06T16:29:22.120225+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120225+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120226+00:00 app[web.1]: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120226+00:00 app[web.1]: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120226+00:00 app[web.1]: at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120227+00:00 app[web.1]: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120227+00:00 app[web.1]: at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120228+00:00 app[web.1]: at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120228+00:00 app[web.1]: at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120228+00:00 app[web.1]: at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120229+00:00 app[web.1]: at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120229+00:00 app[web.1]: at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120230+00:00 app[web.1]: at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120230+00:00 app[web.1]: at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120230+00:00 app[web.1]: at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120231+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_252-heroku]
2020-05-06T16:29:22.120231+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_252-heroku]
2020-05-06T16:29:22.120232+00:00 app[web.1]: at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.33.jar!/:9.0.33]
2020-05-06T16:29:22.120232+00:00 app[web.1]: at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252-heroku]
2020-05-06T16:29:22.120233+00:00 app[web.1]:
2020-05-06T16:29:22.130526+00:00 heroku[router]: at=info method=GET path="/test" host=excel-to-case.herokuapp.com request_id=b92e7552-ab53-43b9-9b71-80d1b597fd0e fwd="197.27.207.239" dyno=web.1 connect=0ms service=21ms status=500 bytes=489 protocol=https
this is my first question at stackoverflow, so I try my best to describe everything in detail.
I have a simple spring-cloud-starter-netflix-eureka-server gradle based project which should only start the eureka server inside a docker container.
I am really new to spring. I tried some older versions of spring cloud starter but nothing worked.
I am building the jar on ubuntu 18.04 with openjdk 10.
It would be really nice if someone could help me!
Thanks a lot!
My SpringBootApplication class looks like this:
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
#SpringBootApplication
#EnableEurekaServer
public class EurekaServiceRegistryApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaServiceRegistryApplication.class, args);
}
}
Here is my build.gradle:
plugins {
id 'java'
id 'org.springframework.boot' version '2.0.3.RELEASE'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-eureka-server', version: '2.0.0.RELEASE'
}
And my dockerfile:
FROM openjdk:8-jre-alpine
ADD ./build/libs/eureka-service-registry-1.0-SNAPSHOT.jar /app/
CMD ["java", "-jar", "/app/eureka-service-registry-1.0-SNAPSHOT.jar"]
EXPOSE 8761
When I run my docker container (and also when I start the application from within IntelliJ) I get the following:
2018-07-02 19:31:51.732 INFO 1 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#3aa9e816: startup date [Mon Jul 02 19:31:51 GMT 2018]; root of context hierarchy
2018-07-02 19:31:51.987 INFO 1 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-07-02 19:31:52.025 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$5a4e4f18] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.3.RELEASE)
2018-07-02 19:31:52.381 INFO 1 --- [ main] r.a.m.e.EurekaServiceRegistryApplication : No active profile set, falling back to default profiles: default
2018-07-02 19:31:52.404 INFO 1 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#72d818d1: startup date [Mon Jul 02 19:31:52 GMT 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#3aa9e816
2018-07-02 19:31:53.495 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=0823e893-dcb5-3d08-bbb3-dc67f56037ba
2018-07-02 19:31:53.524 INFO 1 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-07-02 19:31:53.657 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$5a4e4f18] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-02 19:31:54.053 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8761 (http)
2018-07-02 19:31:54.082 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-07-02 19:31:54.083 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-07-02 19:31:54.097 INFO 1 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-07-02 19:31:54.169 ERROR 1 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_171]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_171]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 8 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1186) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 10 common frames omitted
2018-07-02 19:31:54.170 ERROR 1 --- [ main] org.apache.catalina.core.ContainerBase : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_171]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_171]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:413) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) [spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at de.tudresden.inf.rn.amcs.microservices.eurekaserviceregistry.EurekaServiceRegistryApplication.main(EurekaServiceRegistryApplication.java:11) [classes!/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [eureka-service-registry-1.0-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [eureka-service-registry-1.0-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [eureka-service-registry-1.0-SNAPSHOT.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [eureka-service-registry-1.0-SNAPSHOT.jar:na]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_171]
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 6 common frames omitted
2018-07-02 19:31:54.171 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-07-02 19:31:54.172 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
I've had the same problem.that spring-boot version must one-to-one match eureka version.you can reference to http://projects.spring.io/spring-cloud/
example:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.12.RELEASE</version>
<parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
You need to select proper spring boot and spring cloud version. Also, i was getting error for jettison hence added dependency for jettison to resolve this.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.3.5</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<finalName>eureka-server</finalName>
</build>
Thank you so much for your comments! I first added the spring-boot-starter-web, then the error changed to something with gson.
The answer from here solved my problem at the end.
I am studying spring security and AngularJS using this tutorial. Part One of the tutorial specifies very specific changes to the pom.xml. But when I add those pom.xml changes, an error results.
In eclipse, the error is a compilation error message as follows:
Plugin execution not covered by lifecycle configuration: ro.isdc.wro4j:wro4j-maven-plugin:1.7.6:run (execution: default, phase: generate-resources)
which appears at the following line in pom.xml:
<execution> <!-- this line throws the compilation error in eclipse -->
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
When I try to bypass eclipse by running mvn spring-boot:run on the CentOS terminal, the following stack trace results:
[root#localhost demo]# mvn spring-boot:run
[INFO] lots of INFO lines
[INFO] folder: /home/user/workspace_angular/demo/target/generated-resources/static/css
[INFO] processing group: angular-bootstrap.css
[WARNING] Less warnings are:
[WARNING] 10:1 Cannot link source map. Css result location is not know and could not be deduced from input less source..
[INFO] file size: angular-bootstrap.css -> 131752 bytes
[INFO] lots more INFO lines
[INFO] --- spring-boot-maven-plugin:1.3.0.RELEASE:run (default-cli) # demo ---
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.0.RELEASE)
2015-12-02 16:40:08.685 INFO 10511 --- [ main] com.example.DemoApplication : Starting DemoApplication on localhost.localdomain with PID 10511 (/home/user/workspace_angular/demo/target/classes started by root in /home/user/workspace_angular/demo)
2015-12-02 16:40:08.687 INFO 10511 --- [ main] com.example.DemoApplication : No profiles are active
2015-12-02 16:40:08.886 INFO 10511 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#4617731: startup date [Wed Dec 02 16:40:08 PST 2015]; root of context hierarchy
2015-12-02 16:40:10.390 INFO 10511 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'beanNameViewResolver' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2015-12-02 16:40:11.637 INFO 10511 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2015-12-02 16:40:11.666 INFO 10511 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2015-12-02 16:40:11.667 INFO 10511 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.28
2015-12-02 16:40:11.932 INFO 10511 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2015-12-02 16:40:11.932 INFO 10511 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3046 ms
2015-12-02 16:40:12.524 INFO 10511 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2015-12-02 16:40:12.527 INFO 10511 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2015-12-02 16:40:12.528 INFO 10511 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2015-12-02 16:40:12.528 INFO 10511 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2015-12-02 16:40:12.528 INFO 10511 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2015-12-02 16:40:13.061 INFO 10511 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#4617731: startup date [Wed Dec 02 16:40:08 PST 2015]; root of context hierarchy
2015-12-02 16:40:13.265 INFO 10511 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/resource]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.example.DemoApplication.home()
2015-12-02 16:40:13.267 INFO 10511 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2015-12-02 16:40:13.268 INFO 10511 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-12-02 16:40:13.296 INFO 10511 --- [ main] o.s.w.s.c.a.WebMvcConfigurerAdapter : Adding welcome page: class path resource [static/index.html]
2015-12-02 16:40:13.303 INFO 10511 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2015-12-02 16:40:13.348 INFO 10511 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-12-02 16:40:13.348 INFO 10511 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-12-02 16:40:13.485 INFO 10511 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2015-12-02 16:40:13.826 INFO 10511 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2015-12-02 16:40:13.964 ERROR 10511 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler ["http-nio-8080"]
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:437) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:429) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_45]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:340) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:765) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:986) [tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) [tomcat-embed-core-8.0.28.jar:8.0.28]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:194) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:151) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) [spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at com.example.DemoApplication.main(DemoApplication.java:29) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:467) [spring-boot-maven-plugin-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
2015-12-02 16:40:13.966 ERROR 10511 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:194) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:151) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) [spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at com.example.DemoApplication.main(DemoApplication.java:29) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:467) [spring-boot-maven-plugin-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat"; Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:993) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
... 19 common frames omitted
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:437) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:429) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_45]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:340) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:765) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:986) ~[tomcat-embed-core-8.0.28.jar:8.0.28]
... 20 common frames omitted
2015-12-02 16:40:13.989 INFO 10511 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat
2015-12-02 16:40:14.004 INFO 10511 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath:
[file:/home/user/workspace_angular/demo/target/classes/,
many other files in classpath omitted here on SO for brevity
....
file:/root/.m2/repository/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar]
2015-12-02 16:40:14.005 ERROR 10511 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat servlet container
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:165) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at com.example.DemoApplication.main(DemoApplication.java:29) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:467) [spring-boot-maven-plugin-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:159) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
... 16 common frames omitted
[WARNING]
java.lang.reflect.InvocationTargetException
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:497)
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:467)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat servlet container
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:165)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101)
at com.example.DemoApplication.main(DemoApplication.java:29)
... 6 more
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:159)
... 16 more
[INFO] --------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------
[INFO] Total time: 21.112 s
[INFO] Finished at: 2015-12-02T16:40:14-08:00
[INFO] Final Memory: 55M/156M
[INFO] ------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:run (default-cli) on project demo: An exception occured while running. null: InvocationTargetException: Unable to start embedded Tomcat servlet container: Tomcat connector in failed state -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Note there is an address already in use error mixed in the above stack trace. At first, I thought the error might be due to a port 8080 conflict when restarting the program, but the problem persists even when I run shutdown.sh and startup.sh to restart tomcat. Also, note that the message at the end of the stack trace indicates that a plugin within pom.xml might be causing the problem, which you can verify by clicking on this link.
The complete code in the pom.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<!-- Serves *only* to filter the wro.xml so it can get an absolute path for the project -->
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/wro</outputDirectory>
<resources>
<resource>
<directory>src/main/wro</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>1.7.6</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
<cssDestinationFolder>${project.build.directory}/generated-resources/static/css</cssDestinationFolder>
<jsDestinationFolder>${project.build.directory}/generated-resources/static/js</jsDestinationFolder>
<wroFile>${project.build.directory}/wro/wro.xml</wroFile>
<extraConfigFile>${basedir}/src/main/wro/wro.properties</extraConfigFile>
<contextFolder>${basedir}/src/main/wro</contextFolder>
</configuration>
<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>1.3.8</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I created the project in eclipse with the Spring Tool Suite add ons by selecting File > New > Project... > Spring > Spring Starter Project with only the default parameters, and then following the instructions in the above-linked tutorial explicitly.
The instructions in the tutorial worked until I added the changes to pom.xml shown above and articulated in part one of the tutorial.
So what do I have to do to get the program to compile?
When you execute mvn spring-boot:run it has its own embedded Tomcat, so it does not need separated Tomcat instance to run, thus you have conflict between this two Tomcat.
You have to just run: shutdown.sh and left it this way and try again.
I've been recently trying to deploy an app to Heroku, but it has been proven to be a nightmare to do so. I've got a little web app that works just fine when run locally on my computer, but when run on Heroku, it complaints about a number of errors and I dont have an idea why. I've spent good 10 hours trying to figure out whats going on, but I'm no wiser :/
This is the error I'm getting on Heroku:
2015-07-31T12:27:23.402408+00:00 app[web.1]: 2015-07-31 12:27:23.388 INFO 5 --- [ main] net.wazim.chestnut.ChestnutRunner : Starting ChestnutRunner on 535432cb-b4ba-4353-b753-c90ba501b299 with PID 5 (/app/target/chestnut-jar-with-dependencies.jar started by u55201 in /ap
)
2015-07-31T12:27:23.541824+00:00 app[web.1]: 2015-07-31 12:27:23.541 INFO 5 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#6e6c3152: startup date [Fri Jul 31 12:27:23 UTC
015]; root of context hierarchy
2015-07-31T12:27:24.289699+00:00 app[web.1]: 2015-07-31 12:27:24.289 ERROR 5 --- [ main] o.s.boot.SpringApplication : Application startup failed
2015-07-31T12:27:24.289702+00:00 app[web.1]:
2015-07-31T12:27:24.289704+00:00 app[web.1]: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServl
tContainerFactory bean.
2015-07-31T12:27:24.289705+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
2015-07-31T12:27:24.289707+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
2015-07-31T12:27:24.289708+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
2015-07-31T12:27:24.289711+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
2015-07-31T12:27:24.289714+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
2015-07-31T12:27:24.289713+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
2015-07-31T12:27:24.289710+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
2015-07-31T12:27:24.289719+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:183)
2015-07-31T12:27:24.289716+00:00 app[web.1]: at net.wazim.chestnut.ChestnutRunner.main(ChestnutRunner.java:20)
2015-07-31T12:27:24.289723+00:00 app[web.1]: ... 7 common frames omitted
2015-07-31T12:27:24.289718+00:00 app[web.1]: Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
2015-07-31T12:27:24.289720+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:156)
2015-07-31T12:27:24.289725+00:00 app[web.1]:
2015-07-31T12:27:24.289722+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
2015-07-31T12:27:24.292299+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
2015-07-31T12:27:24.291255+00:00 app[web.1]: Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext d
e to missing EmbeddedServletContainerFactory bean.
2015-07-31T12:27:24.293484+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
2015-07-31T12:27:24.292817+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
2015-07-31T12:27:24.293709+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
2015-07-31T12:27:24.293881+00:00 app[web.1]: at net.wazim.chestnut.ChestnutRunner.main(ChestnutRunner.java:20)
2015-07-31T12:27:24.295144+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:156)
2015-07-31T12:27:24.294360+00:00 app[web.1]: Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
2015-07-31T12:27:24.287624+00:00 app[web.1]: 2015-07-31 12:27:24.286 WARN 5 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt
2015-07-31T12:27:24.287629+00:00 app[web.1]:
2015-07-31T12:27:24.287632+00:00 app[web.1]: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServl
tContainerFactory bean.
2015-07-31T12:27:24.287635+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
2015-07-31T12:27:24.287634+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
2015-07-31T12:27:24.287637+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
2015-07-31T12:27:24.287638+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
2015-07-31T12:27:24.287640+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
2015-07-31T12:27:24.287642+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
2015-07-31T12:27:24.287643+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
2015-07-31T12:27:24.287644+00:00 app[web.1]: at net.wazim.chestnut.ChestnutRunner.main(ChestnutRunner.java:20)
2015-07-31T12:27:24.287646+00:00 app[web.1]: Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
2015-07-31T12:27:24.287653+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:183)
2015-07-31T12:27:24.287655+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:156)
2015-07-31T12:27:24.287656+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
2015-07-31T12:27:24.287658+00:00 app[web.1]: ... 7 common frames omitted
2015-07-31T12:27:24.287659+00:00 app[web.1]:
2015-07-31T12:27:24.292573+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
2015-07-31T12:27:24.288925+00:00 app[web.1]: 2015-07-31 12:27:24.288 INFO 5 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/app/target/chestnut-jar-with-dependencies.jar]
2015-07-31T12:27:24.293047+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
2015-07-31T12:27:24.291522+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
2015-07-31T12:27:24.294699+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:183)
2015-07-31T12:27:24.295403+00:00 app[web.1]: at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
2015-07-31T12:27:24.295483+00:00 app[web.1]: ... 7 more
2015-07-31T12:27:25.312750+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-31T12:27:25.296215+00:00 heroku[web.1]: Process exited with status 1
2015-07-31T12:27:30.103618+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=agile-dusk-9746.herokuapp.com request_id=cce27fd9-9bbc-4a9e-9611-b38535dc9ade fwd="82.3.147.97" dyno= connect= service= status=503 bytes=
Try java $JAVA_OPTS -Dserver.port=$PORT -jar ... into Procfile