> I've set up a session bean which refers to an entity bean. In the
> session bean's ejb-jar.xml I have:
>
> <ejb-ref>
> <description>The Person EJB models a person.</description>
> <ejb-ref-name>ejb/Person</ejb-ref-name>
> <ejb-ref-type>Entity</ejb-ref-type>
> <home>com.lisasoft.telstra.webfoot.ejb.person.PersonHome</home>
> <remote>com.lisasoft.telstra.webfoot.ejb.person.Person</remote>
> </ejb-ref>
>
> and in jboss.xml I have:
>
> <ejb-ref>
> <ejb-ref-name>ejb/Person</ejb-ref-name>
> <jndi-name>Person</jndi-name>
> </ejb-ref>
>
> and it deploys OK. But when I try to get a reference using this code
> (as recommended in the manual):
>
> ProjectHome _projectHome;
> Object lookupObj;
>
> lookupObj = ctx.lookup(projectJndi);
> System.out.println( "Casting from " + lookupObj.getClass().getName() + "
to " + ProjectHome.class.getName() );
> _projectHome = (ProjectHome)lookupObj;
>
> I get this:
>
> [statefulWebfoot] Casting from $Proxy7 to
com.lisasoft.telstra.webfoot.ejb.project.ProjectHome
This is a classloader issue. Do you perhaps have these classes/interfaces in
the system classpath?
> [Auto deploy] Auto deploy of file:/usr/local/tcook/jboss/deploy/output.jar
> [Container factory]
Deploying:file:/usr/local/tcook/jboss/deploy/output.jar
> [Container factory] Loading ejb-jar.xml :
jar:file:/usr/local/tcook/jboss/tmp/deploy/tmpejbjar46621.jar!/META-INF/ejb-
jar.xml
> [Container factory] Loading standardjboss.xml :
jar:file:/usr/local/tcook/jboss/lib/ext/jboss.jar!/org/jboss/metadata/standa
rdjboss.xml
> [Verifier] Verifying
file:/usr/local/tcook/jboss/tmp/deploy/tmpejbjar46621.jar
> [Verifier] Output: Verified.
> [Container factory] Deploying Output
> [Container factory] Container Invoker Optimize='false'
> [Container factory] java.lang.ClassNotFoundException: $Proxy2
> [Container factory] java.lang.ClassNotFoundException: $Proxy1
> [Container factory] java.lang.ClassNotFoundException: class
org.jboss.security.EJBSecurityManagerDefaultImpl
> [Container factory] java.lang.ClassNotFoundException: class
org.jboss.security.SimpleRealmMapping
> [Container factory] java.lang.ClassNotFoundException: $Proxy3
> [Container factory] java.lang.ClassNotFoundException: $Proxy0
> [Container factory] java.lang.ClassNotFoundException: $Proxy4
> [Container factory] java.lang.ClassNotFoundException: class
org.jboss.tm.TxManager
This is probably also a classloader. Fix the above and see if this goes
away.
/Rickard
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]