Buggy code:
public class BaseLocalContainerInvoker implements LocalContainerInvoker { protected static Logger log = Logger . getLogger ( BaseLocalContainerInvoker . class ) ; protected Container container ; protected String jndiName ; protected TransactionManager transactionManager ; protected EJBLocalHome home ; protected EJBLocalObject statelessObject ; protected Map beanMethodInvokerMap ; protected Map homeMethodInvokerMap ; private static TransactionPropagationContextFactory tpcFactory ; public String getJndiName ( ) { } public void setContainer ( Container con ) { } public void create ( ) throws Exception { } public void start ( ) throws Exception { ContainerInvokerContainer invokerContainer = ( ( ContainerInvokerContainer ) ( container ) ) ; if ( ( invokerContainer . getLocalClass ( ) ) == null ) return ; Context iniCtx = new InitialContext ( ) ; jndiName = container . getBeanMetaData ( ) . getJndiName ( ) ; transactionManager = ( ( TransactionManager ) ( iniCtx . lookup ( "java://TransactionManager" ) ) ) ; Method [ ] methods = invokerContainer . getLocalClass ( ) . getMethods ( ) ; beanMethodInvokerMap = new HashMap ( ) ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) { long hash = MarshalledInvocation . calculateHash ( methods [ i ] ) ; beanMethodInvokerMap . put ( new Long ( hash ) , methods [ i ] ) ; } methods = invokerContainer . getLocalHomeClass ( ) . getMethods ( ) ; homeMethodInvokerMap = new HashMap ( ) ; for ( int i = 0 ; i < ( methods . length ) ; i ++ ) homeMethodInvokerMap . put ( new Long ( MarshalledInvocation . calculateHash ( methods [ i ] ) ) , methods [ i ] ) ; Class localHome = invokerContainer . getLocalHomeClass ( ) ; if ( localHome == null ) { BaseLocalContainerInvoker . log . debug ( ( ( container . getBeanMetaData ( ) . getEjbName ( ) ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>Bound,<seq2seq4repair_space>doesn't<seq2seq4repair_space>have<seq2seq4repair_space>local<seq2seq4repair_space>home." ) ) ; return ; } String jndiName = container . getBeanMetaData ( ) . getLocalJndiName ( ) ; String beanName = container . getBeanMetaData ( ) . getEjbName ( ) ; <START_BUG> LocalHomeObjectFactory . rebind ( jndiName , container . getApplication ( ) , container ) ; <END_BUG> StringRefAddr refAddr = new StringRefAddr ( "nns" , jndiName ) ; Reference jndiRef = new Reference ( container . getBeanMetaData ( ) . getLocalHome ( ) , refAddr , LocalHomeObjectFactory . class . getName ( ) , null ) ; Util . rebind ( iniCtx , jndiName , jndiRef ) ; BaseLocalContainerInvoker . log . debug ( ( ( ( "Bound<seq2seq4repair_space>Local<seq2seq4repair_space>" + beanName ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + jndiName ) ) ; } public void stop ( ) { } public void destroy ( ) { } public EJBLocalHome getEJBLocalHome ( ) { } public EJBLocalObject getStatelessSessionEJBLocalObject ( ) { } public EJBLocalObject getStatefulSessionEJBLocalObject ( Object id ) { } public EJBLocalObject getEntityEJBLocalObject ( Object id ) { } public Collection getEntityLocalCollection ( Collection ids ) { } public Object invokeHome ( Method m , Object [ ] args ) throws Exception { } Principal getPrincipal ( ) { } Object getCredential ( ) { } Transaction getTransaction ( ) throws SystemException { } public Object invoke ( Object id , Method m , Object [ ] args ) throws Exception { } class HomeProxy extends LocalHomeProxy implements InvocationHandler { protected String getJndiName ( ) { } protected Object getId ( ) { } public final Object invoke ( final Object proxy , final Method m , Object [ ] args ) throws Throwable { } } class EntityProxy extends LocalProxy implements InvocationHandler { CacheKey cacheKey ; EntityProxy ( Object id ) { } protected String getJndiName ( ) { } protected Object getId ( ) { } public final Object invoke ( final Object proxy , final Method m , Object [ ] args ) throws Throwable { } } class StatefulSessionProxy extends LocalProxy implements InvocationHandler { Object id ; StatefulSessionProxy ( Object id ) { } protected String getJndiName ( ) { } protected Object getId ( ) { } public final Object invoke ( final Object proxy , final Method m , Object [ ] args ) throws Throwable { } } class StatelessSessionProxy extends LocalProxy implements InvocationHandler { protected String getJndiName ( ) { } protected Object getId ( ) { } public final Object invoke ( final Object proxy , final Method m , Object [ ] args ) throws Throwable { } } }

Fix:
LocalHomeObjectFactory . rebind ( jndiName , container . getEjbModule ( ) , container ) ;