<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Session Bean not in JNDI
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/lafr">Frank Langelage</a> in <i>JNDI and Naming</i> - <a href="http://community.jboss.org/message/559900#559900">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I'm trying an upgrade from 4.24 to 6.00.M4.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have a problem with&#160; class MessageEraser.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@Stateless<br/>public class MessageEraser extends EraserBase implements TimedObject, MessageEraserLocal<br/>{</p><p>...</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>MessageEraserLocal is:</p><p>@Local<br/>public interface MessageEraserLocal extends EraserBaseLocal<br/>{</p><p>...</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Base class EraserBase implements some common methods:</p><p>public abstract class EraserBase implements EraserBaseLocal<br/>{</p><p>...</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>MessageEraser is deployed:</p><p>22:15:16,300 INFO&#160; [JBossASKernel] installing bean: jboss.j2ee:ear=fey2e-lafr-sb2000-ipc.ear,jar=ejb-session-core.jar,name=MessageEraser,service=EJB3<br/>22:15:16,300 INFO&#160; [JBossASKernel]&#160;&#160; with dependencies:<br/>22:15:16,301 INFO&#160; [JBossASKernel]&#160;&#160; and demands:<br/>22:15:16,301 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-core.jar/MessageEraser!biz.mbisoftware.fn.ejb.session.core.MessageEraserLocal; Required: Described<br/>22:15:16,302 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-common.jar/Version!biz.mbisoftware.fn.ejb.session.common.VersionLocal; Required: Described<br/>22:15:16,302 INFO&#160; [JBossASKernel]&#160; jboss.ejb:service=EJBTimerService; Required: Described<br/>22:15:16,302 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-core.jar/MessageSink!biz.mbisoftware.fn.ejb.session.core.MessageSinkLocal; Required: Described<br/>22:15:16,303 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-core.jar/TaskHandler!biz.mbisoftware.fn.ejb.session.core.TaskHandlerLocal; Required: Described<br/>22:15:16,303 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-common.jar/MbiFxtxtFacade!biz.mbisoftware.fn.ejb.session.common.MbiFxtxtFacadeLocal; Required: Described<br/>22:15:16,303 INFO&#160; [JBossASKernel]&#160; persistence.unit:unitName=fey2e-lafr-sb2000-ipc.ear/ejb-entity.jar#fey2e-lafr-sb2000-ipc; Required: Described<br/>22:15:16,304 INFO&#160; [JBossASKernel]&#160;&#160; and supplies:<br/>22:15:16,304 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-core.jar/MessageEraser!biz.mbisoftware.fn.ejb.session.core.MessageEraserLocal<br/>22:15:16,305 INFO&#160; [JBossASKernel]&#160; jndi:fey2e-lafr-sb2000-ipc/ejb-session-core.jar/MessageEraser!local<br/>22:15:16,305 INFO&#160; [JBossASKernel]&#160; Class:biz.mbisoftware.fn.ejb.session.core.MessageEraserLocal<br/>22:15:16,305 INFO&#160; [JBossASKernel]&#160; jndi:MessageEraser<br/>22:15:16,306 INFO&#160; [JBossASKernel] Added bean(jboss.j2ee:ear=fey2e-lafr-sb2000-ipc.ear,jar=ejb-session-core.jar,name=MessageEraser,service=EJB3) to KernelDeployment of: ejb-session-core.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But looking at the global JNDI view afterwards it's not there.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The class StartupTimers want's to use MessageEraser through injection:</p><p>public class StartupTimers implements ServletContextListener<br/>{<br/>&#160;&#160;&#160; @EJB<br/>&#160;&#160;&#160; private MessageEraserLocal messageEraser;</p><p>....</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But the injection fails:</p><p>22:16:16,867 ERROR [[/mbi/fey2e-lafr-sb2000-ipc/web]] Error configuring application listener of class biz.mbisoftware.fn.web.StartupTimers: java.lang.RuntimeException: Unable to inject jndi dependency: env/biz.mbisoftware.fn.web.StartupTimers/messageEraser into property biz.mbisoftware.fn.web.StartupTimers.messageEraser: MessageEraser!biz.mbisoftware.fn.ejb.session.core.MessageEraserLocal not bound<br/>&#160;&#160;&#160; at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:82) [:1.5.0]<br/>&#160;&#160;&#160; at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99) [:1.5.0]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:395) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:291) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:285) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:268) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3319) [:]<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardContext.start(StandardContext.java:3828) [:]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:299) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:138) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0-SNAPSHOT]<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]<br/>&#160;&#160;&#160; at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.Beta5]<br/>&#160;&#160;&#160; at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.Beta5]<br/>&#160;&#160;&#160; at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.Beta5]<br/>&#160;&#160;&#160; at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.Beta5]<br/>&#160;&#160;&#160; at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.Beta5]<br/>&#160;&#160;&#160; at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.Alpha10]<br/>&#160;&#160;&#160; at $Proxy41.start(Unknown Source)&#160;&#160; at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.Alpha10]</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/559900#559900">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JNDI and Naming at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>