Boa noite,
Eu criei um projeto do zero, usando apenas outro servidor, JBoss 8.x, e quando tento consumir o serviço tenho o erro abaixo. Do meu entendimento não é preciso fazer nada de outro mundo para fazer isso funcionar no JBoss, ou estou errado?
Alguém pode citar alguma referência de fazer um projeto como o usado no curso funcionar no JBoss?
O erro é:
16:24:54,846 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017534: Registered web context: /garcomApp
16:24:57,698 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "loja.war" (runtime-name : "loja.war")
16:24:57,742 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "garcomApp.war" (runtime-name : "garcomApp.war")
16:24:58,237 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
16:24:58,304 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
16:24:58,353 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.1.Final "Tweek" started in 65438ms - Started 377 of 436 services (102 services are lazy, passive or on-demand)
16:28:11,942 ERROR [io.undertow.request] (default task-3) UT005023: Exception handling request to /garcomApp/usuarios/1: javax.servlet.ServletException: A MultiException has 3 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.garcomApp.rest.UsuarioResource errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on org.garcomApp.rest.UsuarioResource
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:392) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220) [jersey-container-servlet-core-2.5.jar:]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:248) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:167) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:761) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_75]
Caused by: A MultiException has 3 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.garcomApp.rest.UsuarioResource errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on org.garcomApp.rest.UsuarioResource
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:88) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:246) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) [hk2-locator-2.2.0-b21.jar:]
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:158) [jersey-common-2.5.jar:]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2350) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:612) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:597) [hk2-locator-2.2.0-b21.jar:]
at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:173) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:103) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:128) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:110) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:65) [jersey-server-2.5.jar:]
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:250) [jersey-server-2.5.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.5.jar:]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1010) [jersey-server-2.5.jar:]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373) [jersey-container-servlet-core-2.5.jar:]
... 29 more
Caused by: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:74) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:208) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:231) [hk2-locator-2.2.0-b21.jar:]
... 56 more
23:11:59,940 ERROR [io.undertow.request] (default task-4) UT005023: Exception handling request to /garcomApp/usuarios/1: javax.servlet.ServletException: A MultiException has 3 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.garcomApp.rest.UsuarioResource errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on org.garcomApp.rest.UsuarioResource
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:392) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345) [jersey-container-servlet-core-2.5.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220) [jersey-container-servlet-core-2.5.jar:]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:248) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:167) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:761) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_75]
Caused by: A MultiException has 3 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of org.garcomApp.rest.UsuarioResource errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on org.garcomApp.rest.UsuarioResource
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:88) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:246) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456) [hk2-locator-2.2.0-b21.jar:]
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:158) [jersey-common-2.5.jar:]
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2350) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:612) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:597) [hk2-locator-2.2.0-b21.jar:]
at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:173) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:103) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:128) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:110) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:65) [jersey-server-2.5.jar:]
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:250) [jersey-server-2.5.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.5.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.5.jar:]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) [jersey-common-2.5.jar:]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236) [jersey-server-2.5.jar:]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1010) [jersey-server-2.5.jar:]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373) [jersey-container-servlet-core-2.5.jar:]
... 29 more
Caused by: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=UsuarioBusiness,parent=UsuarioResource,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1667802739)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:74) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:208) [hk2-locator-2.2.0-b21.jar:]
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:231) [hk2-locator-2.2.0-b21.jar:]
... 56 more