简体   繁体   中英

Error Deployment Spring Boot with Heroku CLI

I want to deploy my Spring Boot app in heroku with its CLI, but when I run the command git push heroku master , display the following log:

Enumerating objects: 79, done.
Counting objects: 100% (79/79), done.
Delta compression using up to 4 threads
Compressing objects: 100% (53/53), done.
Writing objects: 100% (60/60), 467.49 KiB | 3.57 MiB/s, done.
Total 60 (delta 28), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Java app detected
remote: -----> Installing JDK 12... done
remote: -----> Executing Maven
remote:        $ ./mvnw -DskipTests clean dependency:list install
remote:        [INFO] Scanning for projects...
remote:        [INFO]
remote:        [INFO] --------------------< mx.unitec:Inventario-Backend >--------------------
remote:        [INFO] Building InventarioBackend 0.0.1-SNAPSHOT
remote:        [INFO] --------------------------------[ jar ]---------------------------------
remote:        [INFO]
remote:        [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ Inventario-Backend ---
remote:        [INFO]
remote:        [INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) @ Inventario-Backend ---
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ Inventario-Backend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] Copying 1 resource
remote:        [INFO] Copying 1 resource
remote:        [INFO]
remote:        [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ Inventario-Backend ---
remote:        [INFO] Changes detected - recompiling the module!
remote:        [INFO] Compiling 78 source files to /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/target/classes
remote:        [INFO] -------------------------------------------------------------
remote:        [ERROR] COMPILATION ERROR :
remote:        [INFO] -------------------------------------------------------------
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseService.java:[9,21] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseService.java:[19,26] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: interface unitec.services.WarehouseService
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseServiceImpl.java:[18,21] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseServiceImpl.java:[59,33] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: class unitec.services.WarehouseServiceImpl
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailService.java:[8,21] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailService.java:[12,31] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: interface unitec.services.EmailService
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/MovementServiceImpl.java:[12,21] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[17,21] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[22,20] cannot find symbol
remote:          symbol:   class EmailsConstants
remote:          location: package unitec.utils
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[43,38] cannot find symbol
remote:          symbol:   class InventoryInput
remote:          location: class unitec.services.EmailServiceImpl
remote:        [INFO] 10 errors
remote:        [INFO] -------------------------------------------------------------
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] BUILD FAILURE
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Total time:  9.261 s
remote:        [INFO] Finished at: 2020-05-09T20:51:17Z
remote:        [INFO] ------------------------------------------------------------------------
remote:        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Inventario-Backend: Compilation failure: Compilation failure:
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseService.java:[9,21] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseService.java:[19,26] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: interface unitec.services.WarehouseService
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseServiceImpl.java:[18,21] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/WarehouseServiceImpl.java:[59,33] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: class unitec.services.WarehouseServiceImpl
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailService.java:[8,21] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailService.java:[12,31] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: interface unitec.services.EmailService
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/MovementServiceImpl.java:[12,21] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[17,21] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: package unitec.models
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[22,20] cannot find symbol
remote:        [ERROR]   symbol:   class EmailsConstants
remote:        [ERROR]   location: package unitec.utils
remote:        [ERROR] /tmp/build_65b0ee3f73bcece7280cd5c846ba8f12/src/main/java/unitec/services/EmailServiceImpl.java:[43,38] cannot find symbol
remote:        [ERROR]   symbol:   class InventoryInput
remote:        [ERROR]   location: class unitec.services.EmailServiceImpl
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 aqueous-dusk-36233.
remote:
To https://git.heroku.com/aqueous-dusk-36233.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/aqueous-dusk-36233.git'

I don't understand why during the compilation doesn't load the packages with the classes that mention... So, The application run perfectly in local environtment.

I already tried specify the packages that is causing the error log, but not worked...

I tried everythin. But nothing didn't work..; I tried changing the default compiler Maven plugin with Apache Plugin or Heroku Maven Plugin, added configuration for Spring Boot Maven Plugin, specify the base packages, specify the ComponentScan. specify the AutoConfiguration...

So, I said me: "And if add, compile and push again iteratly?" Worked. Delete all packages of my project and added packages one by one.., First models, second repositories, third services. etc...

I want to cry! This worked!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM