2 Replies Latest reply on Aug 8, 2002 11:08 AM by Jürgen Denzel

    Problem with local interfaces... Please help

    Jürgen Denzel Newbie


      I have a problem with local interfaces.
      Here is a little TestClient I wrote which produces a NullPointerException, although the home object is not null, besides everything works fine when I use remote interfaces.

      package jmsexample.client;

      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.ejb.CreateException;
      import jmsexample.ejb.TriggerMDBLocal;
      import jmsexample.ejb.TriggerMDBLocalHome;

      import java.util.*;

      public class TestJMS {

      public static void main(String[] args) {

      try {

      Context context = new InitialContext();
      Object obj = context.lookup("local/Trigger");
      TriggerMDBLocalHome home = (TriggerMDBLocalHome) obj;
      if (home != null) {
      TriggerMDBLocal trigger = home.create();
      catch (NamingException e) {
      catch (CreateException e) {

      Execution of the client results in this message:

      Exception in thread "main" java.lang.NullPointerException
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy0.create(Unknown Source)
      at jmsexample.client.TestJMS.main(TestJMS.java:21)

      My jndi.properties look like this:

      # Do NOT uncomment this line as it causes in VM calls to go over
      # RMI!

      If I comment the last line, the client does not work either, the message I then receive is:

      Receive timed out

      Could anybody help me with this problem.

      Thank you very much in advance.