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

Problemas no instalura.jar, não consigo iniciar

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/C:/Users/GeraSinergia/Desktop/testReact/v2/instalura.jar!/BOOT-INF/lib/spring-core-4.3.3.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-07-17 09:03:57.208  INFO 11480 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$840baf9b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-17 09:03:57.684  WARN 11480 --- [           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-07-17 09:03:57.701 ERROR 11480 --- [           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:
2 respostas

Fala romerobm, tudo bem ?

NoClassDefFoundError -> javax.xml.bind.ValidatonException Você está executando em um JRE versão 9 ? No Java 9 as classes continuam no JRE, mas com a nova divisão dos módulos alguns não são disponibilizados por padrão. Imagino que seja esse o problema!

Como resolver:

  • Aponte seu JRE para a versão 8 (deve ter ela instalada na sua máquina) antes de tentar subir (projeto foi desenvolvido e compilado nessa versão) ou;

  • Se quiser rodar com Java 9, adicione os módulos faltantes quando for rodar o comando. (É bem simples, algo como: java --add-modules xxx.xxx.xxx -jar seujar.jar). Tem um post bem explicativo do Alexandre Aquiles explicando como se faz aqui -> https://alexandreaquiles.com.br/2017/10/13/sofrencia-com-java-9-cade-meu-jaxb/

Espero ter ajudado. Abraço!

PS: Você também pode usar a api rodando em cloud acessível através de http://instalura-api.herokuapp.com/api/endereco/desejado

solução!

Rafael bom dia,

realmente não conseguir, mas api no cloud já me ajuda!

Obrigado.