jonas 1.5 
Whenever I try to return a null from an ejbFind method, it appears as though the
container is throwing a null pointer exception. I wrote a small testcase that
causes this to occur every time. Is this a known problem? I was trying this
after seeing an example in the Monson-Haefel book where he suggested that the
resut of find methods could be null.

Am I doing something wrong? Is this supposed to happen?


In the bean:

public Enumeration ejbFindANullPointer()
{
  return null;
}

In the client:

try
{
  homeInterface.findANullPointer();
}
catch (Exception e)
{
  System.out.println(e);
}

And the result is always:

java.rmi.ServerRuntimeException: Server RuntimeException; nested exception is: 
        java.lang.NullPointerException:

caught in the try statement above.

Reply via email to