i have a project that is running in localhost:8080 setting. I am quite new to Heroku and git bash and all of this actually.
I get the following errors when pushing my project to Heroku:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/java
remote: -----> Java app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Installing Maven 3.6.2... done
remote: -----> Executing Maven
remote: $ mvn -DskipTests clean dependency:list install
remote: [INFO] Scanning for projects...
remote: [INFO]
remote: [INFO] -------------------------< tkt:wepa_Projekti >--------------------------
remote: [INFO] Building wepa_Projekti 1.0-SNAPSHOT
remote: [INFO] --------------------------------[ jar ]---------------------------------
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/passay/passay/1.6.0/passay-1.6.0.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/passay/passay/1.6.0/passay-1.6.0.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/passay/passay/1.6.0/passay-1.6.0.pom (15 kB at 148 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.pom (2.5 kB at 121 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.pom (13 kB at 1.0 MB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/hibernate/validator/hibernate-validator-parent/6.1.5.Final/hibernate-validator-parent-6.1.5.Final.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator-parent/6.1.5.Final/hibernate-validator-parent-6.1.5.Final.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator-parent/6.1.5.Final/hibernate-validator-parent-6.1.5.Final.pom (67 kB at 2.0 MB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/jboss/arquillian/arquillian-bom/1.1.11.Final/arquillian-bom-1.1.11.Final.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/arquillian/arquillian-bom/1.1.11.Final/arquillian-bom-1.1.11.Final.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/arquillian/arquillian-bom/1.1.11.Final/arquillian-bom-1.1.11.Final.pom (11 kB at 967 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/jboss/shrinkwrap/shrinkwrap-bom/1.2.3/shrinkwrap-bom-1.2.3.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/shrinkwrap-bom/1.2.3/shrinkwrap-bom-1.2.3.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/shrinkwrap-bom/1.2.3/shrinkwrap-bom-1.2.3.pom (4.0 kB at 443 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-bom/2.2.0/shrinkwrap-resolver-bom-2.2.0.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-bom/2.2.0/shrinkwrap-resolver-bom-2.2.0.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-bom/2.2.0/shrinkwrap-resolver-bom-2.2.0.pom (5.3 kB at 331 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-bom/2.0.0-alpha-8/shrinkwrap-descriptors-bom-2.0.0-alpha-8.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-bom/2.0.0-alpha-8/shrinkwrap-descriptors-bom-2.0.0-alpha-8.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-bom/2.0.0-alpha-8/shrinkwrap-descriptors-bom-2.0.0-alpha-8.pom (5.2 kB at 582 kB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.pom
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.pom (11 kB at 1.3 MB/s)
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/ognl/ognl/3.1.12/ognl-3.1.12.jar
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.jar
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.jar
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar
remote: [INFO] Downloading from tmc: https://maven.mooc.fi/releases/org/passay/passay/1.6.0/passay-1.6.0.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/passay/passay/1.6.0/passay-1.6.0.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/ognl/ognl/3.1.12/ognl-3.1.12.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-validation/2.3.2.RELEASE/spring-boot-starter-validation-2.3.2.RELEASE.jar (4.8 kB at 58 kB/s)
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/ognl/ognl/3.1.12/ognl-3.1.12.jar (236 kB at 2.1 MB/s)
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/passay/passay/1.6.0/passay-1.6.0.jar (124 kB at 1.1 MB/s)
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar (92 kB at 760 kB/s)
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/hibernate/validator/hibernate-validator/6.1.5.Final/hibernate-validator-6.1.5.Final.jar (1.3 MB at 5.7 MB/s)
remote: [INFO]
remote: [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wepa_Projekti ---
remote: [INFO]
remote: [INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) @ wepa_Projekti ---
remote: [INFO]
remote: [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ wepa_Projekti ---
remote: [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote: [INFO] Copying 4 resources
remote: [INFO] Copying 21 resources
remote: [INFO]
remote: [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ wepa_Projekti ---
remote: [INFO] Changes detected - recompiling the module!
remote: [INFO] Compiling 44 source files to /tmp/build_b0fadb36/target/classes
remote: [INFO] /tmp/build_b0fadb36/src/main/java/projekti/CustomErrorController.java: /tmp/build_b0fadb36/src/main/java/projekti/CustomErrorController.java uses or overrides a deprecated API.
remote: [INFO] /tmp/build_b0fadb36/src/main/java/projekti/CustomErrorController.java: Recompile with -Xlint:deprecation for details.
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] COMPILATION ERROR :
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/SaunojaService.java:[154,120] cannot find symbol
remote: symbol: method isBlank()
remote: location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/NotificationService.java:[54,81] cannot find symbol
remote: symbol: method isBlank()
remote: location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/MessageService.java:[82,71] cannot find symbol
remote: symbol: method isBlank()
remote: location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/CommentService.java:[56,71] cannot find symbol
remote: symbol: method isBlank()
remote: location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/AccountFreezeService.java:[71,51] cannot find symbol
remote: symbol: method isBlank()
remote: location: class java.lang.String
remote: [INFO] 5 errors
remote: [INFO] -------------------------------------------------------------
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 12.772 s
remote: [INFO] Finished at: 2021-08-18T14:35:20Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project wepa_Projekti: Compilation failure: Compilation failure:
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/SaunojaService.java:[154,120] cannot find symbol
remote: [ERROR] symbol: method isBlank()
remote: [ERROR] location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/NotificationService.java:[54,81] cannot find symbol
remote: [ERROR] symbol: method isBlank()
remote: [ERROR] location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/MessageService.java:[82,71] cannot find symbol
remote: [ERROR] symbol: method isBlank()
remote: [ERROR] location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/CommentService.java:[56,71] cannot find symbol
remote: [ERROR] symbol: method isBlank()
remote: [ERROR] location: class java.lang.String
remote: [ERROR] /tmp/build_b0fadb36/src/main/java/projekti/AccountFreezeService.java:[71,51] cannot find symbol
remote: [ERROR] symbol: method isBlank()
remote: [ERROR] location: class java.lang.String
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/
My Java version:
$ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
It seems that the problem could be with the dependencies of the project, but what i don't understand is, that why would the problem not occur locally.
Project 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
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tkt</groupId>
<artifactId>wepa_Projekti</artifactId>
<name>wepa_Projekti</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.passay</groupId>
<artifactId>passay</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.fluentlenium</groupId>
<artifactId>fluentlenium-junit</artifactId>
<version>3.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.fluentlenium</groupId>
<artifactId>fluentlenium-assertj</artifactId>
<version>3.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
</dependency>
<!-- TMC -->
<dependency>
<groupId>fi.helsinki.cs.tmc</groupId>
<artifactId>edu-test-utils</artifactId>
<version>0.4.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>tmc</id>
<name>TMC repo</name>
<url>https://maven.mooc.fi/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>tmc</id>
<name>TMC repo</name>
<url>https://maven.mooc.fi/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>