[
https://jira.jboss.org/browse/JBAS-8398?page=com.atlassian.jira.plugin.sy...
]
Toshiya Kobayashi updated JBAS-8398:
------------------------------------
Attachment: resource-annotation.war
Attached is a war which reproduces the issue. It also includes java sources.
Injection metadata validation on deploy-time is too aggressive
--------------------------------------------------------------
Key: JBAS-8398
URL:
https://jira.jboss.org/browse/JBAS-8398
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployers, Web (Tomcat) service
Affects Versions: JBossAS-5.1.0.GA, 6.0.0.M4
Reporter: Toshiya Kobayashi
Assignee: Ales Justin
Attachments: resource-annotation.war
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira