2
respostas

Falha pra statar o serviço

Olá, estou tentando subir a aplicação em um servidor JBOSS, porém ocorre uma falha:

2016-12-18 11:06:48,163 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."loja.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."loja.war".WeldStartService: Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_111]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_111]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_111]
Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 20 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private org.glassfish.jersey.server.internal.inject.ParamInjectionResolver.locator
  at org.glassfish.jersey.server.internal.inject.ParamInjectionResolver.locator(ParamInjectionResolver.java:0)

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2 respostas

Olá Weberton, blz?

Tem como enviar o seu web.xml ?

Olá, blzz.... segue

<?xml version="1.0" encoding="UTF-8"?>
<!-- This web.xml file is not required when using Servlet 3.0 container,
     see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html -->
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>br.com.alura.loja.resource</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey Web Application</servlet-name>
        <url-pattern>/webapi/*</url-pattern>
    </servlet-mapping>
</web-app>

Estava pesquisando e parece que o Jboss não dá suporte ao glassfish...