[
https://jira.jboss.org/jira/browse/JBAS-7703?page=com.atlassian.jira.plug...
]
Brian Stansberry commented on JBAS-7703:
----------------------------------------
The LinkRef content of "SimpleStateLessBean" is coming from
WebEJBRemoteHandler.handleFieldAnnotations
ContainerDependencyMetaData cdmd = endpoints.get(info.getComponentKey());
if(cdmd == null)
throw new IllegalStateException("Failed to resolve
ContainerDependencyMetaData for info: "+info+", "+ref);
mappedName = cdmd.getContainerName();
In turn the ContainerDependencyMetaData.containerName value is coming from
MappedReferenceMetaDataResolverDeployer.mapEjbs() which is pulling it from the
JBossEnterpriseBeanMetaData
for(JBossEnterpriseBeanMetaData bean : beans)
{
// The unique id for this ejb in the deployment
String ejbCompID = prefix + "#" + bean.getEjbName();
//LegacyEjb3JndiPolicy policy = new LegacyEjb3JndiPolicy();
String jndiName = bean.determineJndiName();
ContainerDependencyMetaData cdmd = new ContainerDependencyMetaData(jndiName,
bean.getEjbName(), vfsPath);
cdmd.setEjb3X(ejbMetaData.isEJB3x());
The use of JBossEnterpriseBeanMetaData.determineJndiName() is deprecated, with reference
to the long-ago resolved JBMETA-68.
I smell a Branch_5_x change that wasn't ported to trunk as the root cause of this
testsuite failure.
org.jboss.test.web.test.JSPAnnotationENCUnitTestCase.testSimpleEjbJSPAnnotations
--------------------------------------------------------------------------------
Key: JBAS-7703
URL:
https://jira.jboss.org/jira/browse/JBAS-7703
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public(Everyone can see)
Components: Web (Tomcat) service
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-6.0.0.M2
Test case is failing because of a problem in the ENC mapping to global JNDI.
Test deploys a JSP with the following field:
@EJB
private SimpleStateless simpleStateless;
Populating the field results in an exception with the following critical part:
javax.naming.NamingException: Could not dereference object [Root exception is
javax.naming.NameNotFoundException: SimpleStatelessBean not bound]
org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:391)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processAnnotations(TomcatInjectionContainer.java:445)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processDynamicBeanAnnotations(TomcatInjectionContainer.java:407)
org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:290)
org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:281)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
The ENC contains a LinkRef of type LinkAddress, content SimpleStatelessBean. Problem is
"SimpleStatelessBean" does not match the global JNDI namespace binding for the
EJB. The EJB is contained in a jbosstest-jsp-injection.ear and the global JNDI namespace
bindings for the EJB are:
+- jbosstest-jsp-injection (class: org.jnp.interfaces.NamingContext)
| +- SimpleStatelessBean (class: org.jnp.interfaces.NamingContext)
| | +- local-org.jboss.test.web.ejb3.SimpleLocal (class: Proxy for:
org.jboss.test.web.ejb3.SimpleLocal)
| | +- local (class: Proxy for: org.jboss.test.web.ejb3.SimpleLocal)
| | +- remote (class: Proxy for: org.jboss.test.web.ejb3.SimpleStateless)
| | +- remote-org.jboss.test.web.ejb3.SimpleStateless (class: Proxy for:
org.jboss.test.web.ejb3.SimpleStateless)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira