JBAS011001: Could not resolve resource-env-ref in WAR deployment JBoss EAP 6.1.0.Alpha
domkun Mar 25, 2013 7:17 AMHallo all,
I am currently in the process of migrating an application to JBoss EAP 6.1.0.Alpha. I have got an EAR which contains a WAR archive.
My web.xml looks like the following:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>Name</display-name> <servlet>... <resource-env-ref> <description>JMS ConnectionFactory</description> <resource-env-ref-name>java:comp/env/jms/ConnectionFactory</resource-env-ref-name> <resource-env-ref-type>javax.jms.ConnectionFactory</resource-env-ref-type> </resource-env-ref> <resource-env-ref> <description>Request JMS Queue</description> <resource-env-ref-name>java:comp/env/jms/RequestQueue</resource-env-ref-name> <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type> </resource-env-ref> ...
And my jboss-web.xml looks like:
... <resource-ref> <res-ref-name>java:comp/env/jms/ConnectionFactory</res-ref-name> <jndi-name>java:/JmsXA</jndi-name> </resource-ref> <resource-ref> <res-ref-name>java:comp/env/jms/RequestQueue</res-ref-name> <jndi-name>java:/queue/RequestQueue</jndi-name> </resource-ref> ...
During startup of the JBoss AS I get following warnings:
12:06:15,202 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011001: Could not resolve resource-env-ref java:comp/env/jms/ConnectionFactory 12:06:15,203 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011001: Could not resolve resource-env-ref java:comp/env/jms/RequestQueue
Although everything seems to work in my servlet where I use @Resource(name = "java:comp/env/jms/ConnectionFactory") I wanted to know why these warnings are printed in the server log.
Does anybody have a hint for me?
Kind regards
Dominik