Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8398

Injection metadata validation on deploy-time is too aggressive

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate Issue
    • JBossAS-5.1.0.GA, 6.0.0.M4
    • None
    • None

    Description

      If your war file includes Pojo whose field is annotated with @Resource, deployer throws Exception below:

      2010-09-09 00:51:45,460 ERROR [org.apache.catalina.core.StandardContext] (main) Context [/simple1] startup failed due to previous errors
      java.lang.RuntimeException: mapped-name is required for com.example.ResourceBean/obj of deployment simple1.war
      at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(WebResourceHandler.java:287)
      at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(WebResourceHandler.java:325)
      at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:550)
      at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4272)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      Scanning is ok, but validation is too aggressive.
      In JBoss AS 4, such @Resource usage is allowed and it can be utilized by Spring etc.

      Attachments

        Issue Links

          Activity

            People

              rmaucher Remy Maucherat
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: