Hi,
    This is your line
            TestHome folderHome = (TestHome) ctx.lookup("TestBean"); //
exception
     You are asking the context to lookup for "TestBean" (your bean, I
guess) when you should be asking for "TestHome" (the home interface for your
bean).

Diego Salazar
[EMAIL PROTECTED]
TE:+54-11-48073071
www.teradev.com.ar
----- Original Message -----
From: "klaus rubba" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 3:06 PM
Subject: Strange NullPointerException when looking up bean on remote machine


> I have successfully gotten the client to work on the same machine as the
> EJBServer. There are no firewalls, and the initial context is created just
> fine. However, despite the initial context not being null (I verified
this),
> the lookup call throws a NullPointerException.
>
> Here's the code snippet:
>
> public void getBean()
> {
>   InitialContext ctx = getInitialContext(); // successful
>   TestHome folderHome = (TestHome) ctx.lookup("TestBean"); // exception
> thrown here
>   ...
> }
>
> Here's the exception:
>
> java.lang.NullPointerException at MyTestClient.getBean
>     (MyTestClient.java, Compiled Code)
>   at MyTestClient.main(MyTestClient.java:398)
>
>
> I don't know why the stack trace isn't showing me where the exception is
> really happening, cause it surely isn't ctx.lookup() when ctx is verified
to
> be non-null. Could this be internal to RMI somehow? Am I missing something
> in the EJBServers codebase?
>
> Any help would be greatly appreciated!!
>
> Klaus
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to