ejb not bound (no security manager: RMI class loader disable
asia Oct 25, 2006 2:03 PMI am using JBOSS 4.0.4-GA, J2EE1.4 and XDoclet 1.2.3 I have so far created three Stateful EJBs all of which have this following problem (code included just for one):
The following code:
Object objref = initial.lookup("java:comp/env/QuestionFacadeHomeRemote");
Returns the following error:
QuestionFacadeHomeRemote not bound javax.naming.NameNotFoundException: QuestionFacadeHomeRemote not bound
I suspect that the reason is in the JNDI tree
Global JNDI Namespace has the following entry for the QuestionFacadeHomeRemote:
+- QuestionFacadeHomeRemote (proxy: $Proxy74 implements No ClassLoaders found for: com.rev.sips.ejb.QuestionFacadeHome (no security manager: RMI class loader disabled))
The ejb-jar.xml has the following entry for the bean in question:
<session id="Session_QuestionFacade"> <description><![CDATA[An EJB named QuestionFacade]]></description> <display-name>QuestionFacade</display-name> <ejb-name>QuestionFacade</ejb-name> <home>com.rev.sips.ejb.QuestionFacadeHome</home> <remote>com.rev.sips.ejb.QuestionFacade</remote> <local-home>com.rev.sips.ejb.QuestionFacadeLocalHome</local-home> <local>com.rev.sips.ejb.QuestionFacadeLocal</local> <ejb-class>com.rev.sips.ejb.QuestionFacadeSession</ejb-class> <session-type>Stateful</session-type> <transaction-type>Container</transaction-type> </session>
and the QuestionFacadeHome.java has the following code in it:
/* * Generated by XDoclet - Do not edit! */ package com.rev.sips.ejb; /** * Home interface for QuestionFacade. * @generated * @wtp generated */ public interface QuestionFacadeHome extends javax.ejb.EJBHome { public static final String COMP_NAME="java:comp/env/ejb/QuestionFacade"; public static final String JNDI_NAME="QuestionFacadeHomeRemote"; public com.revolution.sips.ejb.QuestionFacade create() throws javax.ejb.CreateException,java.rmi.RemoteException; }
The XDoclet for the bean is:
/** * * <!-- begin-user-doc --> * A generated session bean * <!-- end-user-doc --> * * * <!-- begin-xdoclet-definition --> * @ejb.bean name="QuestionFacade" * description="An EJB named QuestionFacade" * display-name="QuestionFacade" * jndi-name="QuestionFacadeHomeRemote" * type="Stateful" * transaction-type="Container" * view-type="both" * local-jndi-name="QuestionFacadeHomeLocal" * @ejb.interface generate="local,remote" * @ejb.util generate="physical" * <!-- end-xdoclet-definition --> * @generated */
The entry in jboss.xml for this bean is:
<session> <ejb-name>QuestionFacade</ejb-name> <jndi-name>QuestionFacadeHomeRemote</jndi-name> <local-jndi-name>QuestionFacadeHomeLocal</local-jndi-name> <method-attributes> </method-attributes> </session>
I have tried many variations on how JNDI entry is named (including ejb, local and such) but the problem still remains and the entry in the JNDI tree is always
No ClassLoaders found for: com.rev.sips.ejb.QuestionFacadeHome (no security manager: RMI class loader disabled)
I can not grasp what causes this entry. Initially I was using MyEclipse to deploy the code to JBOSS but even when deploying it from the command line I still get all the same problem.