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

Erro 500 ROOT CAUSE java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext

pessoal, inseri os arquivos war no diretório correto. Entretanto , ao tentar acessar recebo o seguinte erro.

caminho: http://localhost:9090/loja/webapi/carrinhos/1

<!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Servlet.init() for servlet [Jersey Web Application] threw exception</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>javax.servlet.ServletException: Servlet.init() for servlet [Jersey Web Application] threw exception
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    java.base&#47;java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    java.base&#47;java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.base&#47;java.lang.Thread.run(Unknown Source)
</pre><p><b>Root Cause</b></p><pre>A MultiException has 7 exceptions.  They are:
1. java.lang.NoClassDefFoundError: javax&#47;xml&#47;bind&#47;JAXBContext
2. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.server.internal.inject.ParamConverters$AggregatedProvider
3. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.server.internal.inject.ParamConverterFactory
4. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.jersey.server.internal.inject.MultivaluedParameterExtractorFactory errors were found
5. java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.jersey.server.internal.inject.MultivaluedParameterExtractorFactory
6. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.glassfish.jersey.server.internal.inject.CookieParamValueFactoryProvider errors were found
7. java.lang.IllegalStateException: Unable to perform operation: resolve on org.glassfish.jersey.server.internal.inject.CookieParamValueFactoryProvider

    org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:88)
    org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:246)
1 resposta
solução!

bem, o problema foi resolvido. o erro ocorria porque JAXB-XML foi considerado depreciado na jdk e nao é mais trazido por padrão no classpath. Como eu estava executando o java10 o problema ocorria. Ao mudar o jre do tomcat da versão 10 para a versão 8 o problema foi resolvido