Making my own project (https://github.com/770001/buyer) based on https://blogg.kantega.no/webapp-with-create-react-app-and-spring-boot/. After deploying to heroku, I get 404 when the application starts, but the rest controller does not work. I can't figure out why. I fight for several days!
P.S. if I deploy the application following this tutorial, everything works. I don't understand why I have 404.
I tried the same thing with another tutorial - https://hackernoon.com/package-your-react-app-with-spring-boot-a-how-to-guide-cdfm329w - if you deploy it to heroku, everything works. But when I create my (identical) - 404.
Everything works for a localhost. I do via maven jar, run it via java -jar target / <name jar file> then run react via cd frontend, yarn start. Everything is working.
What am I doing wrong?
UPDATE
I added to the root folder of the application Procfile:
web java -Dserver.port=$PORT $JAVA_OPTS -jar target/shmot-0.0.1-SNAPSHOT.war
This is my package.json
{
"name": "front",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.8",
"#testing-library/react": "^11.2.3",
"#testing-library/user-event": "^12.6.0",
"http-proxy-middleware": "^1.0.6",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
This is 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.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.khilkevichigor</groupId>
<artifactId>shmot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>shmot</name>
<description>International shopping</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-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</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>
<dependency>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>front</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v12.16.3</nodeVersion>
<npmVersion>6.14.4</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/classes/public">
<fileset dir="${project.basedir}/front/build"/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This is Build Log from heroku:
-----> Building on the Heroku-20 stack
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Executing Maven
$ ./mvnw -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.khilkevichigor:shmot >----------------------
[INFO] Building shmot 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # shmot ---
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) # shmot ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) # shmot ---
[INFO] Installing node version v12.16.3
[INFO] Unpacking /tmp/codon/tmp/cache/.m2/repository/com/github/eirslett/node/12.16.3/node-12.16.3-linux-x64.tar.gz into /tmp/build_ab545a20_/target/node/tmp
[INFO] Copying node binary from /tmp/build_ab545a20_/target/node/tmp/node-v12.16.3-linux-x64/bin/node to /tmp/build_ab545a20_/target/node/node
[INFO] Installed node locally.
[INFO] Installing npm version 6.14.4
[INFO] Unpacking /tmp/codon/tmp/cache/.m2/repository/com/github/eirslett/npm/6.14.4/npm-6.14.4.tar.gz into /tmp/build_ab545a20_/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm install) # shmot ---
[INFO] Running 'npm install' in /tmp/build_ab545a20_/front
[INFO]
[INFO] > core-js#2.6.12 postinstall /tmp/build_ab545a20_/front/node_modules/babel-runtime/node_modules/core-js
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO] Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
[INFO]
[INFO] The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
[INFO] > https://opencollective.com/core-js
[INFO] > https://www.patreon.com/zloirock
[INFO]
[INFO] Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
[INFO]
[INFO]
[INFO] > core-js#3.8.2 postinstall /tmp/build_ab545a20_/front/node_modules/core-js
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO]
[INFO] > core-js-pure#3.8.2 postinstall /tmp/build_ab545a20_/front/node_modules/core-js-pure
[INFO] > node -e "try{require('./postinstall')}catch(e){}"
[INFO]
[INFO]
[INFO] > ejs#2.7.4 postinstall /tmp/build_ab545a20_/front/node_modules/ejs
[INFO] > node ./postinstall.js
[INFO]
[INFO] Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[INFO]
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.1 (node_modules/fsevents):
[WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[ERROR]
[INFO] added 1926 packages from 760 contributors and audited 1929 packages in 45.11s
[INFO]
[INFO] 126 packages are looking for funding
[INFO] run `npm fund` for details
[INFO]
[INFO] found 0 vulnerabilities
[INFO]
[INFO]
[INFO] --- frontend-maven-plugin:1.6:npm (npm run build) # shmot ---
[INFO] Running 'npm run build' in /tmp/build_ab545a20_/front
[INFO]
[INFO] > front#0.1.0 build /tmp/build_ab545a20_/front
[INFO] > react-scripts build
[INFO]
[INFO] Creating an optimized production build...
[INFO] Compiled successfully.
[INFO]
[INFO] File sizes after gzip:
[INFO]
[INFO] 41.69 KB build/static/js/2.25b2f903.chunk.js
[INFO] 1.39 KB build/static/js/3.5c32b29a.chunk.js
[INFO] 1.16 KB build/static/js/runtime-main.f423ac52.js
[INFO] 802 B build/static/js/main.529d8860.chunk.js
[INFO] 531 B build/static/css/main.8c8b27cf.chunk.css
[INFO]
[INFO] The project was built assuming it is hosted at /.
[INFO] You can control this with the homepage field in your package.json.
[INFO]
[INFO] The build folder is ready to be deployed.
[INFO] You may serve it with a static server:
[INFO]
[INFO] npm install -g serve
[INFO] serve -s build
[INFO]
[INFO] Find out more about deployment here:
[INFO]
[INFO] https://cra.link/deployment
[INFO]
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (default) # shmot ---
[INFO] Executing tasks
main:
[copy] Copying 19 files to /tmp/build_ab545a20_/target/classes/public
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # shmot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # shmot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /tmp/build_ab545a20_/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # shmot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /tmp/build_ab545a20_/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # shmot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_ab545a20_/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # shmot ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) # shmot ---
[INFO] Packaging webapp
[INFO] Assembling webapp [shmot] in [/tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Building war: /tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.1:repackage (repackage) # shmot ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # shmot ---
[INFO] Installing /tmp/build_ab545a20_/target/shmot-0.0.1-SNAPSHOT.war to /tmp/codon/tmp/cache/.m2/repository/com/khilkevichigor/shmot/0.0.1-SNAPSHOT/shmot-0.0.1-SNAPSHOT.war
[INFO] Installing /tmp/build_ab545a20_/pom.xml to /tmp/codon/tmp/cache/.m2/repository/com/khilkevichigor/shmot/0.0.1-SNAPSHOT/shmot-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2021-01-13T07:33:38Z
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 221.8M
-----> Launching...
Released v22
https://shmoting.herokuapp.com/ deployed to Heroku
This is application logs from heroku:
2021-01-13T07:32:15.000000+00:00 app[api]: Build started by user khilkevichigor#gmail.com
2021-01-13T07:34:01.911760+00:00 app[api]: Deploy 1a70b985 by user khilkevichigor#gmail.com
2021-01-13T07:34:01.911760+00:00 app[api]: Release v22 created by user khilkevichigor#gmail.com
2021-01-13T07:34:03.105197+00:00 heroku[web.1]: State changed from crashed to starting
2021-01-13T07:34:12.000000+00:00 app[api]: Build succeeded
2021-01-13T07:34:24.571031+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=49823 $JAVA_OPTS -jar target/shmot-0.0.1-SNAPSHOT.war`
2021-01-13T07:34:27.415308+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2021-01-13T07:34:27.420758+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2021-01-13T07:34:30.011053+00:00 app[web.1]:
2021-01-13T07:34:30.011193+00:00 app[web.1]: . ____ _ __ _ _
2021-01-13T07:34:30.011284+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2021-01-13T07:34:30.011383+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2021-01-13T07:34:30.011477+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2021-01-13T07:34:30.011570+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2021-01-13T07:34:30.011668+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2021-01-13T07:34:30.013324+00:00 app[web.1]: :: Spring Boot :: (v2.4.1)
2021-01-13T07:34:30.013382+00:00 app[web.1]:
2021-01-13T07:34:30.433585+00:00 app[web.1]: 2021-01-13 07:34:30.428 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : Starting ShmotApplication v0.0.1-SNAPSHOT using Java 1.8.0_275-heroku on affa4dd6-bc17-41aa-b83b-7290ef507210 with PID 4 (/app/target/shmot-0.0.1-SNAPSHOT.war started by u5738 in /app)
2021-01-13T07:34:30.436511+00:00 app[web.1]: 2021-01-13 07:34:30.436 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : No active profile set, falling back to default profiles: default
2021-01-13T07:34:34.414783+00:00 app[web.1]: 2021-01-13 07:34:34.414 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-01-13T07:34:34.670946+00:00 app[web.1]: 2021-01-13 07:34:34.670 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 223 ms. Found 2 JPA repository interfaces.
2021-01-13T07:34:37.245660+00:00 app[web.1]: 2021-01-13 07:34:37.244 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 49823 (http)
2021-01-13T07:34:37.288439+00:00 app[web.1]: 2021-01-13 07:34:37.288 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-01-13T07:34:37.288893+00:00 app[web.1]: 2021-01-13 07:34:37.288 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-01-13T07:34:39.683441+00:00 app[web.1]: 2021-01-13 07:34:39.683 INFO 4 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-01-13T07:34:39.683661+00:00 app[web.1]: 2021-01-13 07:34:39.683 INFO 4 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8934 ms
2021-01-13T07:34:40.337172+00:00 app[web.1]: 2021-01-13 07:34:40.334 INFO 4 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-01-13T07:34:40.486708+00:00 app[web.1]: 2021-01-13 07:34:40.485 INFO 4 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.25.Final
2021-01-13T07:34:41.135637+00:00 app[web.1]: 2021-01-13 07:34:41.135 INFO 4 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-01-13T07:34:41.407961+00:00 app[web.1]: 2021-01-13 07:34:41.407 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-01-13T07:34:42.079667+00:00 app[web.1]: 2021-01-13 07:34:42.079 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-01-13T07:34:42.171030+00:00 app[web.1]: 2021-01-13 07:34:42.170 INFO 4 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
2021-01-13T07:34:43.969250+00:00 app[web.1]: 2021-01-13 07:34:43.968 INFO 4 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-01-13T07:34:43.987686+00:00 app[web.1]: 2021-01-13 07:34:43.987 INFO 4 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-01-13T07:34:45.065217+00:00 app[web.1]: 2021-01-13 07:34:45.064 WARN 4 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-01-13T07:34:47.509625+00:00 app[web.1]: 2021-01-13 07:34:47.507 INFO 4 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#235a0c16, org.springframework.security.web.context.SecurityContextPersistenceFilter#3401a114, org.springframework.security.web.header.HeaderWriterFilter#73173f63, org.springframework.security.web.authentication.logout.LogoutFilter#319bc845, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#5e8ac0e1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#4233e892, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#58ffcbd7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2b5f4d54, org.springframework.security.web.session.SessionManagementFilter#655ef322, org.springframework.security.web.access.ExceptionTranslationFilter#25e2ab5a, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#37ddb69a]
2021-01-13T07:34:47.944922+00:00 app[web.1]: 2021-01-13 07:34:47.944 INFO 4 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-01-13T07:34:48.163350+00:00 app[web.1]: 2021-01-13 07:34:48.163 INFO 4 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [public/index.html]
2021-01-13T07:34:48.933082+00:00 heroku[web.1]: State changed from starting to up
2021-01-13T07:34:48.717965+00:00 app[web.1]: 2021-01-13 07:34:48.716 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 49823 (http) with context path ''
2021-01-13T07:34:48.745993+00:00 app[web.1]: 2021-01-13 07:34:48.745 INFO 4 --- [ main] c.khilkevichigor.shmot.ShmotApplication : Started ShmotApplication in 19.827 seconds (JVM running for 21.325)
It feels like React isn't working!
Related
I am trying to deploy my springboot & React & Mongodb app to Heroku but I'm unable to do so. I'm seeing errors logged in the terminal.
When I run git push heroku main, I get the following error.
Module not found: Error: Can't resolve 'React' in '/tmp/build_565ab5c4/src/main/js/components'
I've tried npm install react & npm install react-dom and also pushed everything to remote main branch.
remote: [INFO] WARNING in configuration
remote: [INFO] The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
remote: [INFO] You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
remote: [INFO]
remote: [INFO] ERROR in ./src/main/js/components/recipesHub.js
remote: [INFO] Module not found: Error: Can't resolve 'React' in '/tmp/build_565ab5c4/src/main/js/components'
remote: [INFO] # ./src/main/js/components/recipesHub.js 7:13-29
remote: [INFO] # ./src/main/js/components/session.js
remote: [INFO] # ./src/main/js/app.js
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 02:46 min
remote: [INFO] Finished at: 2021-08-06T23:54:05Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:webpack (webpack build) on project KitchenHelperProject: Failed to run task: 'webpack.js ' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [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 myApp.
remote:
My pom.xml file:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.9.1</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v16.5.0</nodeVersion>
<npmVersion>7.19.1</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>webpack build</id>
<goals>
<goal>webpack</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.8</version>
<executions>
<execution>
<id>generate-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html</backend>
<doctype>book</doctype>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-asciidoctor</artifactId>
<version>${spring-restdocs.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
My package.json file:
{
"name": "myApp",
"version": "1.0.0",
"description": "My app project",
"main": "index.js",
"dependencies": {
"#fontsource/roboto": "^4.5.0",
"#material-ui/core": "latest",
"#material-ui/icons": "latest",
"#material-ui/styles": "4.11.4",
"axios": "^0.21.1",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"bootstrap": "^5.0.2",
"clsx": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "latest",
"rest": "^2.0.0",
"webpack": "^4.10.2",
"webpack-cli": "^3.1.1"
},
"devDependencies": {
"jest": "^23.1.0"
},
"scripts": {
"start": "npm run webpack",
"webpack": "webpack -d --watch",
"heroku-postbuild": "npm run build"
}
My project structure:
Project set-up
I found why I was getting the error - a silly mistake made by a teammate that I didn't realise until I looked closer at the file causing the error i.e. recipesHub.js
I had the following line in this file:
import React from 'React';
which I then changed to:
import React from 'react';
A small typo that took me 24 hours to notice :))
The deployment to Heroku was then successful. So all good :D
In my case, my package.json didn't have direct dependency on react! My local development went fine because I had an indirect dependency via react-hot-loader, which I wasn't aware of; I checked with below command:
$ npm list react
cards#1.0.0 ~/Learning/react/cards
├─┬ react-hot-loader#4.13.0
│ ├─┬ react-dom#17.0.2
│ │ └── react#17.0.2 deduped
│ └── react#17.0.2
└─┬ react-router-dom#4.3.1
├─┬ react-router#4.3.1
│ └── react#17.0.2 deduped
└── react#17.0.2 deduped
Heroku fails to run the application without direct react dependency (Having direct dependency is the best practice anyway!) with the same error in OP. It was successful after I installed the dependencies directly:
npm install react react-dom
Not exactly sure what is taking so long for npm to install on my EC2 instance, but here's the log output:
----------------------------------------
/var/log/eb-engine.log
----------------------------------------
2020/10/10 00:43:19.430098 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-665496786822,object: /resources/environments/e-779g33dt9k/_runtime/versions/manifest_1602290543372
2020/10/10 00:43:19.636192 [INFO] Download successful243bytes downloaded
2020/10/10 00:43:19.636422 [INFO] Trying to read and parse version manifest...
2020/10/10 00:43:19.636595 [INFO] Executing instruction: stopSqsd
2020/10/10 00:43:19.636602 [INFO] This is a web server environment instance, skip stop sqsd daemon...
2020/10/10 00:43:19.636606 [INFO] Executing instruction: StageApplication
2020/10/10 00:44:03.357499 [INFO] extracting
/opt/elasticbeanstalk/deployment/app_source_bundleto/var/app/staging/
2020/10/10 00:44:03.357569 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o
/opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2020/10/10 00:44:03.972792 [INFO] finished extracting
/opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2020/10/10 00:44:03.973892 [INFO] Executing instruction: RunConfigDeployPreBuildHooks
2020/10/10 00:44:03.973905 [WARN] skipping hooks scripts under /opt/elasticbeanstalk/hooks/
2020/10/10 00:44:03.973917 [INFO] The dir .platform/confighooks/prebuild/ does not exist in the
application. Skipping this step...
2020/10/10 00:44:03.973922 [INFO] Executing instruction: Install customer specified node.js version
2020/10/10 00:44:03.973927 [INFO] installing specified nodejs version...
2020/10/10 00:44:03.974861 [INFO] validate the node.js version specified by customer...
2020/10/10 00:44:03.974877 [INFO] Nodejs 12.16.1 has already been installed, skipping
2020/10/10 00:44:03.974882 [INFO] Executing instruction: Use NPM to install dependencies
2020/10/10 00:44:03.974895 [INFO] use npm to install dependencies
2020/10/10 00:44:03.974932 [INFO] Running command /bin/sh -c npm config set jobs 1
2020/10/10 00:44:10.557446 [INFO] Running command /bin/sh -c npm --production install
2020/10/10 00:59:11.436998 [ERROR] An error occurred during execution of command [config-deploy] -
[Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --
production install failed with error Command timed out after 900 seconds
I'm using the full CodePipeline, here is my buildspec.yml (spacing abbreviated):
# Buildspec version
version: 0.2
frontend:
phases:
preBuild:
commands:
- echo Installing NPM dependencies...
- npm ci
build:
commands:
- npm run-script build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
This should output a directory build for CodeDeploy, which uses this appspec.yml:
version: 0.0
os: linux
files:
- source: /
destination: /var/app/current
Turns out that Beanstalk likes to try to do things its own way, and I have it set to the Nodejs platform so it is going to try to run npm install and npm start at all costs.
I ended up disabling it through not including my package.json or package lock files in CodeBuild's artifact. This at least stopped it from trying to run its own NPM install. Not exactly efficient and I port all my node_modules over but it is zipped as an artifact from CodeBuild and sent to Beanstalk for deployment.
I'm new to react and webpack. Maven seems to be unable to process my css files. Running mvn install has a syntax error unexpected token on the first character of my CSS file. Does it have to do with this warning I'm getting?
[WARNING] npm WARN webpack-cli#2.0.14 requires a peer of webpack#^4.0.0 but none was installed.
I tried updating webpack to that version 4.0.0 but that gave me babel-loader issues. I'm new to tracking down maven dependencies. Can anyone take at my package.json config and maven output? Any help would be appreciated.
Here's my package.json:
{
"name": "misdeal",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^15.3.2",
"react-dom": "^15.3.2",
"rest": "^1.3.1",
"webpack": "^1.12.2"
},
"scripts": {
"watch": "webpack --watch -d"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"webpack-cli": "^2.0.14"
}
}
Here's the maven install output:
[INFO] --- frontend-maven-plugin:1.2:install-node-and-npm (install node and npm) # misdeal ---
[INFO] Installing node version v4.4.5
[INFO] Copying node binary from C:\Users\btillinghast\.m2\repository\com\github\eirslett\node\4.4.5\node-4.4.5-win-x64.exe to C:\Users\btillinghast\git\misdeal\target\node\node.exe
[INFO] Installed node locally.
[INFO] Installing npm version 3.9.2
[INFO] Unpacking C:\Users\btillinghast\.m2\repository\com\github\eirslett\npm\3.9.2\npm-3.9.2.tar.gz into C:\Users\btillinghast\git\misdeal\target\node\node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.2:npm (npm install) # misdeal ---
[INFO] Running 'npm install' in C:\Users\btillinghast\git\misdeal
[WARNING] npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
[WARNING] npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.1.3
[WARNING] npm WARN webpack-cli#2.0.14 requires a peer of webpack#^4.0.0 but none was installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.2:webpack (webpack build) # misdeal ---
[INFO] Running 'webpack.js ' in C:\Users\btillinghast\git\misdeal
[INFO] Hash: 6c98a449ae4f6374613a
[INFO] Version: webpack 1.15.0
[INFO] Time: 1332ms
[INFO] Asset Size Chunks Chunk Names
[INFO] ./src/main/resources/static/built/bundle.js 756 kB 0 [emitted] main
[INFO] ./src/main/resources/static/built/bundle.js.map 880 kB 0 [emitted] main
[INFO] + 187 hidden modules
[INFO]
[INFO] ERROR in ./src/main/resources/static/App.css
[INFO] Module build failed: SyntaxError: C:/Users/btillinghast/git/misdeal/src/main/resources/static/App.css: Unexpected token (1:0)
[INFO]
[INFO] > 1 | .App {
[INFO] | ^
[INFO] 2 | text-align: center;
[INFO] 3 | }
[INFO] 4 |
[INFO]
[INFO] # ./src/main/js/containers/App.js 13:0-41
You need to update Webpack, the version you have is outdated, the current version is 4.5.0 the version you have installed is 1.12.2 and Webpack CLI requires at least version 4.0.0
Try npm update -g webpack
If that does not work
Try npm install --save-dev webpack
or with Yarn
Try yarn add webpack --dev
I am using the following command to build zeppelin 0.8 on ubuntu
mvn clean package -Pbuild-distr -Pyarn -Pspark-1.6
-Dspark.version=1.6.0 -Phadoop-2.6 -Dhadoop.version=2.6.0-cdh5.9.0 -DskipTests -Pvendor-repo
I am getting following error
[WARNING] warning Unmet peer dependency "eslint#>=3.8.1".
[INFO] [4/4] Building fresh packages...
[INFO] $ bower install --silent
[INFO] Done in 77.54s.
[INFO]
[INFO] --- frontend-maven-plugin:1.3:yarn (yarn build) # zeppelin-web ---
[INFO] Running 'yarn run build' in /home/[USER]/zeppelin/zeppelin-web
[INFO] yarn run v0.18.1
[INFO] $ npm-run-all clean
[ERROR] ERROR: spawn npm ENOENT
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
.
[INFO] Zeppelin: web Application ......................... FAILURE [1:20.415s]
[INFO] Zeppelin: Server .................................. SKIPPED
[INFO] Zeppelin: Packaging distribution .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:35.974s
[INFO] Finished at: Fri Jan 27 08:44:39 PST 2017
[INFO] Final Memory: 196M/464M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn build) on project zeppelin-web: Failed to run task: 'yarn run build' failed. (error code 1) -> [Help 1]
[ERROR]
Installing npm on the host resolved the issue for me
heroku deployment error springboot & angularjs
I want to deploy to heroku an app i made but i have the following error log when accessing the app
angularjs files are in the resources/public file
no #Controller in teh code, only #RestControllers
heroku logs
2016-10-13T13:20:33.599545+00:00 heroku[web.1]: State changed from up to crashed
2016-10-13T13:20:33.584354+00:00 heroku[web.1]: Process exited with status 1
2016-10-13T13:25:42.179094+00:00 heroku[api]: Deploy d36a2ab by gabrielvoicujpi#gmail.com
2016-10-13T13:25:42.179155+00:00 heroku[api]: Release v4 created by gabrielvoicujpi#gmail.com
2016-10-13T13:25:42.400208+00:00 heroku[slug-compiler]: Slug compilation started
2016-10-13T13:25:42.400213+00:00 heroku[slug-compiler]: Slug compilation finished
2016-10-13T13:25:42.801854+00:00 heroku[web.1]: State changed from crashed to starting
2016-10-13T13:25:49.483010+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port 43279 target/*.war`
2016-10-13T13:25:51.505462+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2016-10-13T13:25:51.516519+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
2016-10-13T13:25:52.141324+00:00 app[web.1]: Expanding zee-0.0.1-SNAPSHOT.war into /app/target/tomcat.43279/webapps/expanded
2016-10-13T13:25:52.141429+00:00 app[web.1]: Adding Context for /app/target/tomcat.43279/webapps/expanded
2016-10-13T13:25:52.802705+00:00 app[web.1]: Oct 13, 2016 1:25:52 PM org.apache.coyote.AbstractProtocol init
2016-10-13T13:25:52.802715+00:00 app[web.1]: INFO: Initializing ProtocolHandler ["http-nio-43279"]
2016-10-13T13:25:52.837120+00:00 app[web.1]: Oct 13, 2016 1:25:52 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
2016-10-13T13:25:52.837123+00:00 app[web.1]: INFO: Using a shared selector for servlet write/read
2016-10-13T13:25:52.843373+00:00 app[web.1]: Oct 13, 2016 1:25:52 PM org.apache.catalina.core.StandardService startInternal
2016-10-13T13:25:52.843376+00:00 app[web.1]: INFO: Starting service Tomcat
2016-10-13T13:25:52.844718+00:00 app[web.1]: Oct 13, 2016 1:25:52 PM org.apache.catalina.core.StandardEngine startInternal
2016-10-13T13:25:52.844720+00:00 app[web.1]: INFO: Starting Servlet Engine: Apache Tomcat/8.0.30
2016-10-13T13:25:53.074753+00:00 heroku[web.1]: State changed from starting to up
2016-10-13T13:25:53.544355+00:00 app[web.1]: INFO: No global web.xml found
2016-10-13T13:25:53.544339+00:00 app[web.1]: Oct 13, 2016 1:25:53 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
2016-10-13T13:26:00.615921+00:00 app[web.1]: Oct 13, 2016 1:26:00 PM org.apache.jasper.servlet.TldScanner scanJars
2016-10-13T13:26:00.637149+00:00 app[web.1]: Oct 13, 2016 1:26:00 PM org.apache.catalina.core.ContainerBase startInternal
2016-10-13T13:26:00.615944+00:00 app[web.1]: INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2016-10-13T13:26:00.637154+00:00 app[web.1]: SEVERE: A child container failed during start
2016-10-13T13:26:00.637158+00:00 app[web.1]: at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2016-10-13T13:26:00.637158+00:00 app[web.1]: at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2016-10-13T13:26:00.637156+00:00 app[web.1]: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2016-10-13T13:26:00.637160+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
2016-10-13T13:26:00.637160+00:00 app[web.1]: at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
2016-10-13T13:26:00.637161+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.637162+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
2016-10-13T13:26:00.637163+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
2016-10-13T13:26:00.637163+00:00 app[web.1]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2016-10-13T13:26:00.637164+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016-10-13T13:26:00.637164+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016-10-13T13:26:00.637165+00:00 app[web.1]: at java.lang.Thread.run(Thread.java:745)
2016-10-13T13:26:00.637179+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2016-10-13T13:26:00.637180+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2016-10-13T13:26:00.637182+00:00 app[web.1]: ... 6 more
2016-10-13T13:26:00.637183+00:00 app[web.1]: Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager;
2016-10-13T13:26:00.637184+00:00 app[web.1]: at org.apache.tomcat.websocket.WsWebSocketContainer.<clinit>(WsWebSocketContainer.java:77)
2016-10-13T13:26:00.637185+00:00 app[web.1]: at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
2016-10-13T13:26:00.637186+00:00 app[web.1]: at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
2016-10-13T13:26:00.637186+00:00 app[web.1]: at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5244)
2016-10-13T13:26:00.637187+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.637188+00:00 app[web.1]: ... 6 more
2016-10-13T13:26:00.637188+00:00 app[web.1]:
2016-10-13T13:26:00.638936+00:00 app[web.1]: Oct 13, 2016 1:26:00 PM org.apache.catalina.core.ContainerBase startInternal
2016-10-13T13:26:00.638937+00:00 app[web.1]: SEVERE: A child container failed during start
2016-10-13T13:26:00.638938+00:00 app[web.1]: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
2016-10-13T13:26:00.638939+00:00 app[web.1]: at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2016-10-13T13:26:00.638940+00:00 app[web.1]: at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2016-10-13T13:26:00.638940+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
2016-10-13T13:26:00.638941+00:00 app[web.1]: at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
2016-10-13T13:26:00.638942+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.638942+00:00 app[web.1]: at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
2016-10-13T13:26:00.638943+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.638944+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.638943+00:00 app[web.1]: at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
2016-10-13T13:26:00.638945+00:00 app[web.1]: at org.apache.catalina.startup.Tomcat.start(Tomcat.java:344)
2016-10-13T13:26:00.638945+00:00 app[web.1]: at webapp.runner.launch.Main.main(Main.java:261)
2016-10-13T13:26:00.638957+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2016-10-13T13:26:00.638958+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
2016-10-13T13:26:00.638955+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
2016-10-13T13:26:00.638959+00:00 app[web.1]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2016-10-13T13:26:00.638957+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
2016-10-13T13:26:00.638961+00:00 app[web.1]: at java.lang.Thread.run(Thread.java:745)
2016-10-13T13:26:00.638962+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: A child container failed during start
2016-10-13T13:26:00.638959+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016-10-13T13:26:00.638960+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016-10-13T13:26:00.638963+00:00 app[web.1]: at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
2016-10-13T13:26:00.638964+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.638965+00:00 app[web.1]: ... 6 more
2016-10-13T13:26:00.638962+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924)
2016-10-13T13:26:00.638965+00:00 app[web.1]:
2016-10-13T13:26:00.639458+00:00 app[web.1]: Exception in thread "main" org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
2016-10-13T13:26:00.639613+00:00 app[web.1]: at org.apache.catalina.startup.Tomcat.start(Tomcat.java:344)
2016-10-13T13:26:00.639544+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2016-10-13T13:26:00.639681+00:00 app[web.1]: at webapp.runner.launch.Main.main(Main.java:261)
2016-10-13T13:26:00.639808+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
2016-10-13T13:26:00.639920+00:00 app[web.1]: at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
2016-10-13T13:26:00.639863+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2016-10-13T13:26:00.639984+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.640041+00:00 app[web.1]: ... 2 more
2016-10-13T13:26:00.640152+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
2016-10-13T13:26:00.640281+00:00 app[web.1]: at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
2016-10-13T13:26:00.640401+00:00 app[web.1]: ... 4 more
2016-10-13T13:26:00.640513+00:00 app[web.1]: Caused by: org.apache.catalina.LifecycleException: A child container failed during start
2016-10-13T13:26:00.640217+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
2016-10-13T13:26:00.640343+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.640658+00:00 app[web.1]: at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
2016-10-13T13:26:00.640727+00:00 app[web.1]: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
2016-10-13T13:26:00.640588+00:00 app[web.1]: at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924)
2016-10-13T13:26:00.640785+00:00 app[web.1]: ... 6 more
2016-10-13T13:26:01.036824+00:00 heroku[web.1]: Process exited with status 1
2016-10-13T13:26:00.946067+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=demowebsitezee2.herokuapp.com request_id=c52590a1-7379-4c49-a312-ebe64e2bae29 fwd="5.2.224.229" dyno=web.1 connect=6ms service=6250ms status=503 bytes=0
2016-10-13T13:26:01.073458+00:00 heroku[web.1]: State changed from up to crashed
2016-10-13T13:26:01.335026+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=demowebsitezee2.herokuapp.com request_id=99691c07-53eb-4759-a246-d22843a6fee8 fwd="5.2.224.229" dyno= connect= service= status=503 bytes=
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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zee</groupId>
<artifactId>zee</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Zee</name>
<description>Zee's Personal Website</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.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>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<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>
<!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<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>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.github.jsimone</groupId>
<artifactId>webapp-runner</artifactId>
<version>8.0.30.2</version>
<destFileName>webapp-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Can you please tell me what to do ?
Thanks