Note that there are some explanatory texts on larger screens.

plurals
  1. POJava EE @Resource isn't mapping to web.xml
    primarykey
    data
    text
    <p>I am trying to develop a web application with a java back end but I need to track if the tasks are complete and I am using the <code>ManagedExecutorService</code> for this.</p> <p>I am trying to use the <code>@Resource</code> annotation to inject a <code>ManagedExecutorService</code> as follows.</p> <pre><code>@Resource(name = "myExecutionService") private ManagedExecutorService mExecutionService; </code></pre> <p>web.xml:</p> <pre><code>&lt;resource-env-ref&gt; &lt;resource-env-ref-name&gt;myExecutionService&lt;/resource-env-ref-name&gt; &lt;resource-env-ref-type&gt;javax.enterprise.concurrent.ManagedExecutorService&lt;/resource-env-ref-type&gt; &lt;/resource-env-ref&gt; </code></pre> <p>but I keep getting an error saying that I am missing the "Services with missing/unavailable dependencies"</p> <pre><code>13:52:31,207 INFO [org.jboss.as.server] (management-handler-threads - 158) JBAS015870: Deploy of deployment "tbm-core-1.0.war" was rolled back with failure message {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"tbm-core-1.0.war\".WeldService" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"tbm-core-1.0.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [TestBedManager] with qualifiers [@Default] at injection point [[field] @Inject private com.shenick.teravm.core.ws.TestBedManagerWebService.testBedManager]"},"JBAS014771: Services with missing/unavailable dependencies" =&gt; ["jboss.naming.context.java.module.\"tbm-core-1.0\".\"tbm-core-1.0\".env.myExecutionServicejboss.naming.context.java.jboss.resources.myExecutionServiceMissing[jboss.naming.context.java.module.\"tbm-core-1.0\".\"tbm-core-1.0\".env.myExecutionServicejboss.naming.context.java.jboss.resources.myExecutionService]"]} </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload