Hi, I have two ear files called arcipelago-application.ear and arcipelago-data.ear, successfully deployed under JBoss 3.2.1 each with a jboss-app.xml file into META-INF:
1. <jboss-app> <loader-repository>com.nobody:loader=arcipelago-application.ear</loader-repository> </jboss-app> 2. <jboss-app> <loader-repository>com.nobody:loader=arcipelago-data.ear</loader-repository> </jboss-app> Each bean works fine when called from outside JBoss, but I get a NullPointerException when creating a remote session from one EA to another. A sample testcase is provided below. It works when ran outside jboss and crashes from within: the home retrieved is not null in both cases, but in the latter a NPE is raised from create(). Any idea? package com.nobody.arcipelago.common; import java.util.Hashtable; import javax.ejb.EJBHome; import javax.naming.Context; import javax.naming.InitialContext; import junit.framework.TestCase; import com.nobody.arcipelago.data.ejb.session.DataFacade; import com.nobody.arcipelago.data.ejb.session.DataFacadeHome; public class EAR2EARTest extends TestCase { private static String PROVIDER_URL = "localhost:1099"; private static String INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory"; private static String URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces"; public EAR2EARTest(String name) { super(name); } public void testEAR2EAR() throws Throwable { String jndiName = "ejb/data/DataFacade"; Class homeClass = DataFacadeHome.class; Context context = new InitialContext(); Object ref = context.lookup(jndiName); Object obj = javax.rmi.PortableRemoteObject.narrow(ref, homeClass); System.out.println("after narrow " + obj + " | " + obj.hashCode() + " | " + obj.getClass()); DataFacadeHome home = (DataFacadeHome) obj; System.out.println("home=" + home); DataFacade session = home.create(); System.out.println("session=" + session); } } ----------------------------------------- This email was sent using FREE Catholic Online Webmail. http://webmail.catholic.org/ ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user