Use of Spring @Resource leads to "mapped-name is required" Exception in JBoss EAP

Solution Verified - Updated -


  • A @Resource annotation is used to wire a Spring components
  • During deployment, a RuntimeException is encountered indicating failure to bind the resource:

    java.lang.RuntimeException: mapped-name is required for <some-class-name>/<some-field-name> of deployment abc.war
        at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(
        at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(
        at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(


  • Spring

    • 2.5.6
    • 3.0
  • Red Hat JBoss Enterprise Application Platform (EAP)

    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In