Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

A API disponibilizada não carrega, apresenta o erro enviado abaixo. Como faço para executá-la.

:: Spring Boot ::        (v1.4.1.RELEASE)

2018-05-12 09:46:23.347  INFO 584 --- [           main] br.com.alura.instalura.Boot              : Starting Boot v1.0.0-SNAPSHOT on WRFernandes-DKT with PID 584 (C:\react-native\bkp_instalura-api-master\instalura.jar started by wrobe in c:\react-native\bkp_instalura-api-master)
2018-05-12 09:46:23.364  INFO 584 --- [           main] br.com.alura.instalura.Boot              : No active profile set, falling back to default profiles: default
2018-05-12 09:46:23.565  INFO 584 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3e694b3f: startup date [Sat May 12 09:46:23 BRT 2018]; root of context hierarchy
2018-05-12 09:46:27.072  INFO 584 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'corsFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=webAppConfiguration; factoryMethodName=corsFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [br/com/alura/instalura/conf/WebAppConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=boot; factoryMethodName=corsFilter; initMethodName=null; destroyMethodName=(inferred); defined in br.com.alura.instalura.Boot]
2018-05-12 09:46:28.662  INFO 584 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$7dab0267] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-12 09:46:29.150  WARN 584 --- [           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.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.http.encoding-org.springframework.boot.autoconfigure.web.HttpEncodingProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
2018-05-12 09:46:29.168 ERROR 584 --- [           main] o.s.boot.SpringApplication               : Application startup failed

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.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.http.encoding-org.springframework.boot.autoconfigure.web.HttpEncodingProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.4.1.RELEASE.jar!/:1.4.1.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535) ~[spring-context-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationC
1 resposta
solução!

Oi Wilson,

Se estiver rodando o projeto local que baixou no github o erro pode ser por causa da versão do Java. O projeto dá esse erro caso você rode com Java 9. Se for rodar local, é preciso usar o Java 8.

Caso prefira, é possível seguir o curso usando a API que está em https://instalura-api.herokuapp.com/.