netodevel / cli-spring-boot-scaffold

command line for generate crud and configs for spring boot projects
131 stars 49 forks source link

mvn install ERROR ERROR ERROR! #54

Closed danilomeneghel closed 5 years ago

danilomeneghel commented 5 years ago

[INFO] 18 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] spring-boot-generate 0.0.1-SNAPSHOT ................ FAILURE [ 42.815 s] [INFO] spring-scaffold-cli 0.0.1-SNAPSHOT ................. SKIPPED [INFO] Spring generate api scaffold kotlin 0.0.1.BUILD-SNAPSHOT SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44.144 s [INFO] Finished at: 2018-10-24T19:01:11-03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5:compile (default-compile) on project spring-boot-generate: Compilation failure: Compilation failure: [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[6,28] package br.com.example.model does not exist [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[18,21] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.service.UserService [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[22,16] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.service.UserService [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[27,26] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.service.UserService [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[27,16] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.service.UserService [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[32,28] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.service.UserService [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[20,28] package br.com.example.model does not exist [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[52,59] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[58,53] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[84,53] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[19,38] cannot find symbol [ERROR] symbol: method findAll() [ERROR] location: variable userRepository of type br.com.example.repository.UserRepository [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/service/UserService.java:[23,38] cannot find symbol [ERROR] symbol: method findOne(java.lang.Integer) [ERROR] location: variable userRepository of type br.com.example.repository.UserRepository [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[37,22] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[45,25] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[59,17] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[74,33] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[85,17] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot-scaffold/spring-boot-generate/src/main/java/br/com/example/controller/UserController.java:[100,33] cannot find symbol [ERROR] symbol: class User [ERROR] location: class br.com.example.controller.UserController [ERROR] -> [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/MojoFailureException

netodevel commented 5 years ago

Track a issue #53

danilomeneghel commented 5 years ago

Thanks, solved!

Now not work: spring db:create -p "mysql" Wed Oct 24 20:41:54 BRT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

or

spring db:create Unexpected error

java.lang.NullPointerException at br.com.netodevel.command.migrate.DBCreateHandler.run(DBCreateHandler.java:31) at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84) at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54) at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219) at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171) at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63) 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:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

Already configurate appplicate.properties

danilomeneghel commented 5 years ago

Created tables in db, manual, but...

mvn spring-boot:run

1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.104 s [INFO] Finished at: 2018-10-24T20:51:08-03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project my-project: Compilation failure [ERROR] /C:/Users/danil/Documents/NetBeansProjects/spring-boot/my-project/src/main/java/com/example/service/UserService.java:[23,38] method findOne in interface org.springframework.data.repository.query.QueryByExampleExecutor cannot be applied to given types; [ERROR] required: org.springframework.data.domain.Example [ERROR] found: java.lang.Integer [ERROR] reason: cannot infer type-variable(s) S [ERROR] (argument mismatch; java.lang.Integer cannot be converted to org.springframework.data.domain.Example) [ERROR] [ERROR] -> [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/MojoFailureException

danilomeneghel commented 5 years ago

Can you help me because the project does not work?

netodevel commented 5 years ago

@danilomeneghel, Fix the problem when running mvn install, on your other error above is due to new interface from spring-data-jpa to version 2.x.x of spring boot.

Replace in your code the findOnemethod for findById