Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-960

@Resource declaration validation seems to be too strict

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 7.0.0.CR1
    • Component/s: None
    • Labels:
      None
    • Environment:

      running against commit a004da8272d7717225bfa1bc65534bb4b599bc1b

      Description

      I have a third-party library in my app that has a (non-necessary) class in it that declares a @Resource that looks like this:
      @Resource ( name = "service-bean-interceptors" )

      This class is not referenced by any deployment descriptor in my project. However, AS7 fails to deploy my app with this message:

      11:54:04,894 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."ccp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ccp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "ccp.war"
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
      	at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Can't handle @Resource for ENC name: service-bean-interceptors since it's missing a "lookup" (or "mappedName") value and isn't of any known type
      	at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.process(ResourceInjectionAnnotationParsingProcessor.java:224)
      	at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.processMethodResource(ResourceInjectionAnnotationParsingProcessor.java:183)
      	at org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor.deploy(ResourceInjectionAnnotationParsingProcessor.java:134)
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
      	... 4 more
      
      11:54:04,897 INFO  [org.jboss.as.server] (MSC service thread 1-4) Service status report
        Services which failed to start:
            service jboss.deployment.unit."ccp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ccp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "ccp.war"
      

      I think AS7 should instead ignore this class.
      See the linked forum thread for more info.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                matt.drees Matt Drees
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: