Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Problema na execução do JAR

Já vi que essa é uma dúvida recorrente aqui no forum, inclusive passei por vários tópicos tentando achar uma resposta mas nada ainda ...

Não tinha nada instalado na minha máquina e segui todos os passos indicados no link: https://cursos.alura.com.br/course/react/task/19739

O meu mysql já está rodando e ao dar um 'status' ele me retorna isso:

--------------
mysql  Ver 8.0.11 for Win64 on x86_64 (MySQL Community Server - GPL)

Connection id:          9
Current database:
Current user:           root@localhost
SSL:                    Cipher in use is DHE-RSA-AES128-GCM-SHA256
Using delimiter:        ;
Server version:         8.0.11 MySQL Community Server - GPL
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    cp850
Conn.  characterset:    cp850
TCP port:               3306
Uptime:                 23 min 21 sec

Threads: 2  Questions: 7  Slow queries: 0  Opens: 110  Flush tables: 2  Open tables: 86  Queries per second avg: 0.004
--------------

Me parece tudo OK. Instalei ele com a senha 'root' como indicado no tutorial e ao instalar o jar eu usei o comando: java -Dspring.datasource.password=root -jar jar-cdc-react.jar

Incusive tentei tambem apenas com: java -jar jar-cdc-react.jar

e ele me retorna a mesma mensagem abaixo:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/F:/cursos/react/app_curso_alura/jar-cdc-react.jar!/lib/spring-core-4.2.4.RELEASE.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-06-25 21:50:04.653  INFO 6300 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$722b5dbc] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-06-25 21:50:04.812  WARN 6300 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.boot.autoconfigure.web.ServerProperties org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration.properties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties' defined in class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class]: Initialization of bean failed; nested exception is javax.validation.ValidationException: Unable to instantiate Configuration.
2018-06-25 21:50:04.834 ERROR 6300 --- [           main] o.s.boot.SpringApplication               : Application startup failed

Já tentei até desinstalar o mysql e nada ... alguma sugestão ?

2 respostas
solução!

Fala ai Jean, tudo bem ?

Cara acredito que o problema nesse caso seja a versão do mysql, acredito que o instrutor do curso usou uma versão um pouco diferente no jar dele, que por isso, está tendo problemas para contornar isso.

Opa valeu mathes consegui aqui, porém alem de trocar a versão do mysql tive que trocar a versão do Java tambem. Valeu mesmo ^^