3
respostas

Erro na hora de levantar o servidor (depois de configurado jpa)

Estou com o seguinte erro quando tento levantar o servidor. Isso so aconteceu quando eu configurei o jpa

Erro:

SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.1.RELEASE)

2017-12-24 01:45:50.800  INFO 8899 --- [           main] br.com.fpf.base.Configuracao             : Starting Configuracao on PC-Erick with PID 8899 (/root/eclipse-workspace/listavip/target/classes started by root in /root/eclipse-workspace/listavip)
2017-12-24 01:45:50.807  INFO 8899 --- [           main] br.com.fpf.base.Configuracao             : No active profile set, falling back to default profiles: default
2017-12-24 01:45:51.950  INFO 8899 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@130161f7: startup date [Sun Dec 24 01:45:51 AMT 2017]; root of context hierarchy
2017-12-24 01:45:54.578  INFO 8899 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$fd72a246] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-12-24 01:45:55.548  INFO 8899 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-12-24 01:45:55.576  INFO 8899 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-12-24 01:45:55.578  INFO 8899 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.5
2017-12-24 01:45:55.832  INFO 8899 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-12-24 01:45:55.832  INFO 8899 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3898 ms
2017-12-24 01:45:56.084  INFO 8899 --- [ost-startStop-1] o.s.j.d.DriverManagerDataSource          : Loaded JDBC driver: com.mysql.jdbc.Driver
Sun Dec 24 01:45:56 AMT 2017 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=

Pool.xml

<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>br.alura.com.listavip</groupId>
  <artifactId>listavip</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>1.4.1.RELEASE</version>
        </dependency>        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>1.4.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>1.4.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.40</version>
        </dependency>
    </dependencies>

</project>
3 respostas

Olá, tudo bem?

Esse foi um warning e não um erro. Poderia colocar o erro da stack, pf.

Obrigado por responder rápido professor!

O erro completo estar no seguinte link:

https://gist.github.com/erickcastelo/c583c9820095e559d8fd935eec8418e0

Oi Erick.

Pelo erro, o erro estourou na sua controller quando o Spring foi tentar injetar o seu repository.

Veja então se os dados de conexão com o banco de dados estão corretas, pois o Spring não conseguiu construir o repository.

Se mesmo assim o erro continuar, vamos ter que investigar a sua controller e a classe do seu repository.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software