[
https://issues.jboss.org/browse/AS7-960?page=com.atlassian.jira.plugin.sy...
]
Stuart Douglas resolved AS7-960.
--------------------------------
Assignee: Stuart Douglas (was: jaikiran pai)
Fix Version/s: 7.0.0.CR1
Resolution: Done
I have relaxed the resource processing so that a warning is logged rather than aborting
the deployment if an @Resource cannot be resolved.
@Resource declaration validation seems to be too strict
--------------------------------------------------------
Key: AS7-960
URL:
https://issues.jboss.org/browse/AS7-960
Project: Application Server 7
Issue Type: Bug
Environment: running against commit a004da8272d7717225bfa1bc65534bb4b599bc1b
Reporter: Matt Drees
Assignee: Stuart Douglas
Fix For: 7.0.0.CR1
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:
{noformat}
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"
{noformat}
I think AS7 should instead ignore this class.
See the linked forum thread for more info.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira